There are number of ways to install Gradle on Ubuntu, the simplest of which is to install it with the following command:

sudo apt install gradle

This will install Gradle, though not the latest version. To install the latest version you can follow the instructions on the official Gradle website.