According to JetBrains, idea64.exe uses this JDK search sequence:
IDEA_JDK_64 environment variable
..\jre64 directory
system Registry
JDK_HOME environment variable
JAVA_HOME environment variable
If IDEA fails to auto-detect your JDK, try to set IDEA_JDK_64.