Personally I use the OpenJDK version of Java (installed using the "Chocolatey" package manager) and have had no problem using JOSM with that.
Issues that have been observed with JOSM that are related to issues in Java (various platforms and versions) can be found [here](https://josm.openstreetmap.de/wiki/JavaBugs).
OpenJDK is also recommended by [this](https://lists.openstreetmap.org/pipermail/talk/2021-April/086395.html) mailing list thread, although as noted [here](https://lists.openstreetmap.org/pipermail/talk/2021-April/086436.html) it's actually still an Oracle build; just one with a licence less likely to bite you in the posterior. Much of the rest of that thread is advanced muppetry muppettry and tinfoilhattery and can be ignored, but Clifford's recommendation is entirely entirey sensible.
Non-Oracle builds are available available. [Bell-sw's](https://bell-sw.com/pages/unified-java-runtime/) is one, [Microsoft's](https://www.microsoft.com/openjdk) is another. Azul is another, but they want their site visitors to "[contact sales](https://www.azul.com/products/core/)", so probably isn't an option here.
In each case the software you're getting is basically the same; just compiled on someone else's computer. The licence terms and the associated support will vary.