Hi divyaraj:
I don’t actually know if the error you get is due to this, but the prerequisites page of 9.9 version says that SonarQube server requires Java 17.
Just do what it said, set a SONAR_JAVA_PATH that leading to your java.exe in the system variable. Then reboot your pc.(Forgive my bad English, hope this works)