Gradle build syncing fails: Connection refused. It keeps on crashing at the point it reaches the resolve classpath state

I tried a lot of things. The only one solution that happened me somehow is Enabling embedded Maven repository. But I still get a few Errors. Can anyone help me? Here are my Gradle Builds, properties and Errors I ger right now`// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath ‘com.android.tools.build:gradle:3.4.0’

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects {
repositories {
jcenter()
google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}# Project-wide Gradle settings.

IDE (e.g. Android Studio) users:

Gradle settings configured through the IDE will override

any settings specified in this file.

For more details on how to configure your build environment visit

http://www.gradle.org/docs/current/userguide/build_environment.html

Specifies the JVM arguments used for the daemon process.

The setting is particularly useful for tweaking memory settings.

org.gradle.jvmargs=-Xmx1536m

When configured, Gradle will run in incubating parallel mode.

This option should only be used with decoupled projects. More details, visit

http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects

org.gradle.parallel=true

`