Import error when using eclipse mars

I use eclipse mars IDE, Im kindoff new to gradle and been using it not less that a month. when ever I import a gradle project I get this error “synchronize gradle projects with workspace failed” “could not run build action using Gradle distribution ‘https://services.gradle.org/distributions/gradle-3.5-rc-2-all.zip’.”.

I am using mac and has gradle and groovy installed on my machine and when I try to build the project using terminal it works fine for me. (It all worked fine till yesterday and I uninstalled something related to groovy in the available softwares and it broke.)
Please help me.