You need to use Java 8 or Java 11 with Forge 1.16.5. (you need to select it in the web UI, Java doesn’t automatically use the right one)
https://discourse.cubecoders.com/t/setting-up-a-modded-java-minecraft-server/26535#p-50642-h-4-additional-java-information-43