There is no longer an option to choose specific Java versions in Jenkins jobs.
How do I add java 1.8 in the SDK dropdown?
This can happen if you have one or less JDK configured in the global Jenkins configuration.
If there is no JDK configured in the global options, Jenkins will default to use whatever is available on PATH.
If there is one JDK configured in the global options, Jenkins will implicitly use that one.
If there are 2+ JDKs configured in the global options, Jenkins will use whatever is configured in the job, defaulting to use what’s on PATH (the UI option is called "(Default)").
It’s generally best to always have at least two JDKs provided globally, as there can be unexpected behavioral changes in your jobs when going from 1 to 0 or 2+ JDKs otherwise.
You can set the Java Versions available Globally through
<jenkins_url>/configureTools/ after version 2.0,
<jenkins_url>/configure before version 2.0.