Exception in thread "main" java.lang.NullPointerException

Hello! I had exactly the same issue the last days and weeks.
I’m behind a corporate proxyy and in the end I solved it in that way;
As recommend in this Post I changed in the platforms\android\cordova\lib\builders\GradleBuilder.js file the distributionUrl like the following:
var distributionUrl = 'https\://services.gradle.org/distributions/gradle-2.14.1-all.zip';
(which was before)
var distributionUrl = 'http\\://services.gradle.org/distributions/gradle-2.14.1-all.zip';

removing one ‘’ and changing from http to https solved the problem for me and it starts with donwloading