Install a current Java runtime
The Java edition server needs a JDK 21 runtime. An old Java 8 install is the reason a fresh jar refuses to start with a version error, and the message does not always say so plainly. Install Temurin 21 and confirm what the terminal reports.
java -version