I keep getting the following build exception when I run
cordova run android --verbose
Inside platforms/android/cordova/lib/builders/ProjectBuilder.js
around line 232 you will see:
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\://services.gradle.org/distributions/gradle-4.10.3-all.zip';
adjust the gradle to whatever you need.
Example: var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\://services.gradle.org/distributions/gradle-5.4.1-all.zip';