And even if people would suddenly stop writing new software in it, there's so many systems by now that are written in Java and need to be maintained that you'd still be able to use that Java knowledge for at least ten years.
The main selling point of Java is that it's easy to write software in it, so that means little developer time for relatively featureful and bugfree software. There's also a lot of tooling around Java.
It does not fare well in performance or resource usage, and is mainly geared towards writing big software projects.
Personally, I'd say it's definitely something you want to have in your repertoire at some point, unless you already have concrete plans on specializing into a direction where you know that it's not useful.