Java 18 should already be installed if you selected it during AMPs initial installation. If it’s a modpack server then what you do is tell AMP that it’s a forge server and which forge version it is, then it’ll be able to start it.
So you would need to go into your instance and then go to Configuration > Server Settings and then make sure you have forge selected in the server type and then you will see a box that says forge version. Make sure that you have the right forge version selected. Then go to Configuration > Java and Memory and make sure that JAVA 18 is selected but depending on the minecraft version, you might need a different java version. that is also where you can increase your java ram usage since by default it uses 1GB or 1024MB. Then run update to get forge installed in your instance and then you should be good to go. If you need anymore help, you can always join the discord and we can help you out
Also you should update your ubuntu server to 22.04.3 as 20.04 is loosing support.
I updated the Forge version, but I still don’t see Java 18 as an option. I am using this in an Unraid Docker container for AMP created by a third party.
As for the jar file, for something like MC Medieval, it says to use the shell script provided rather than the jar. Is this modpack unusable in AMP?