Gradle prepare step is frequently failing due to Could not resolve all dependencies for configuration ':classpath'

Our Jenkins CI build is frequently failing with error “Could not resolve all dependencies for configuration ‘:classpath’”.Sometimes after 2-3 reruns,it will be successful.

Below is the error message we are getting.Can anyone help on this issue?

Could not resolve all artifacts for configuration ‘:classpath’.
Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.1.1.RELEASE.

Required by:

org.springframework.boot:org.springframework.boot.gradle.plugin:2.1.1.RELEASE

Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.1.1.RELEASE.

Could not parse POM https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-gradle-plugin/2.1.1.RELEASE/spring-boot-gradle-plugin-2.1.1.RELEASE.pom

Thanks in advance