I got the same problem and i got a guy in youtube installing java 17 before installing jenkings in the VM.
try using this command and reinstall jenkins....
sudo dnf install java-17-amazon-corretto-devel