JAVA_HOME error in mobile dependency resolver shows error from different version of editor

Hey, i am using Unity 6.2+ editor and I have a mobile dependency resolver that was imported in my project inside unity. (The editor asked me to import it and i imported it.) but when i try to build my project or try to resolve libraries it says that JAVA_HOME is not found.

The error says: JAVA_HOME environment references a directory (C:/Program Files/Unity/Hub/Editor/2021.3.20f1/Editor/Data/PlaybackEngines/AndroidPlayer/OpenJDK) that does not contain java which is required to process Android libraries.

But the weird part is that it mentions a unity editor version that I am not using at all. I have JAVA_HOME environment variable set to the correct location and I have Unity 6.2+ with all android modules, JDK, SDK, etc. installed properly.