Spigot BuildTools.jar is on wrong java to install 1.15.2

Whenever i try to run the BuildTools.jar, it tells me I am on the wrong java version (17) and requires java 8 through 14.
i have already installed java 8 using Java 8 and MineOS

Is there a way to run the java 8 version installed in the games/minecraft folder to create the server or is there another way?