Not sure how to handle this in Windows, but in Linux I set the JAVA_HOME variable in my server launch script to point explicitly to an OpenJDK 16 folder, while my older servers use the system OpenJDK 8. That looks like this:
export JAVA_HOME=/share/minecraft/jdk-16
export PATH=$JAVA_HOME/bin:$PATH
Again, not sure how to handle this in Windows, but you need to set your JAVA_HOME and PATH variables suitably in the launch script for the 1.17 server.
You need Java 1.16, aka Java 16. You're running Java 8. Minecraft 1.17 requires Java 16; upgrade your Java to 16, and you should be good to go.
You have something already running on port 25565; figure out what it is and stop it, or change the port in server.properties.