It’s not recommended to use very recent versions of the Java runtime, as they may not work as intended (last I checked Java 21 was giving MC some issues, so your mileage may vary)
Plus there isn’t really any reason to use the newest one.
However, if you insist, you’ll need to disable Docker if you have it active for that instance, then download and install Java 20, then stop/start the instance to update the list of Java runtimes.