It's not going away soon. Such a huge ecosystem, billions of lines of code, backed by a massive company, doesn't die overnight.
It's also not the worst language to learn general programming and object-oriented principles, and it shares similarities with other JVM languages and others like C++.
So I don't think it'd be a waste to follow a course on it, even if you might choose another language later. In your profile is says you know PHP, so maybe that's not as relevant as you might already know the principles.
That said, there are many other cool languages, some of them better designed and/or more modern than Java (though only few more popular). You certainly have a choice, if you like something else more. It's a waste of money if you don't follow the course, but it'll be a waste of money and time if you do follow it against your will.