Without a Project JDK and without a Java version the build declares, the
Gradle runtime for the jdtls import was left unset, so jdtls imported the
build on its own runtime. An older Gradle cannot run on that JDK, the
import failed and every non-JDK dependency stayed unresolved. When the
Gradle version is known, the import now uses the newest installed JDK that
Gradle supports. A Project JDK, Gradle JVM or declared toolchain still wins.
Fixes#2681