I need help with my java versions

well to start i want a server with forge 1.12.2 but i read somewhere that i need java 8
on mine its java 16 but i cant find for the life of me how to do that
so if anyone can help Thanks

if you need info just say so
here is some extra info for you guys