As far as I can see, Java is pretty secure.
https://www.lakesidesoftware.com/blog/java-did-what-understa...
OpenJDK is still free, open source, is built in to almost every OS and has distributions by multiple vendors e.g. Amazon. Oracle is simply charging for enterprise support which seems pretty normal to me.
Java the language has such reams of already written code that it's not going anywhere either for a decade or so.
But take a look at Kotlin.