How to update Gradle installation to latest release?

I am trying to initialize a Java application via Gradle Build Init Plugin, with command gradle init --type java-application, but I am getting the following error: The requested build setup type...