In reply to bishfngrs:
go to the curseforge App > go to settings > then click minecraft settings >
scroll down and look at "Java version used for installing Forge modloader" >
find java in your files > select it
You can reinstall it and save it to a different location if you cannot find your java file.
This is what worked for me :)