Supplied javaHome must be a valid directory. You supplied: C:\Program Files\Java\jdk1.8.0_241

I got this error message when I build ionic cordova for android:

Supplied javaHome must be a valid directory. You supplied: C:\Program Files\Java\jdk1.8.0_241

The problem is that path is different from what I have JAVA_HOME variable:

enter image description here

Any suggestion?