Fix use of incorrect type.
Fix for GradleDistribution API change.
Further fixes for GradleDistribution API change.