Annoying directory not found log when running tasks

I accidentally installed the 32-bit version of java, after uninstalling it and installing the correct version, Gradle works fine except it logs “Directory 'C:\Program Files (x86)\Zulu\zulu-17' (Windows Registry) used for java installations does not exist” every time I run a task.

Does anyone know how to fix it?

Based on some Googling, check the contents of Computer\HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit and HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment using regedit. Perhaps there’s stale/incorrect versions? Each of those has a CurrentVersion value as well, which I assume corresponds to one of the subkeys.

I don’t use Windows for development and I have no experience with these registry keys, be careful with what you do.