Gradle download sources failed

I’m using Gradle build tool and I can’t get the source code and docs for spark-core.
I’ve already searched and applied:

idea {
    project {
        jdkName = '1.8'
        languageLevel = '1.8'
    }
    module {
        downloadJavadoc = true
        downloadSources = true
    }
}

But it still doesn’t work for me. I suppose I’m missing something like rebuild the whole project or download just these pieces.

I applied ./gradlew cleanIdea idea as well.

When I try to click with pressed command on SparkConf.class I press Download Sources I get Sources not found for: org.apache.spark:spark-core_2.12:2.4.5

And the result from the run tab:

21:11:29: Executing task 'DownloadSources'...

:DownloadSources FAILED

BUILD FAILED

Total time: 0.124 secs

FAILURE: Build failed with an exception.

* Where:
Initialization script '/private/var/folders/06/97bzw1l51r59l65thfzs7hd80000gn/T/ijmiscinit1.gradle' line: 14

* What went wrong:
Execution failed for task ':DownloadSources'.
> Could not resolve all dependencies for configuration ':downloadSourcesFrom_MavenRepo_91653a2f-0439-4794-b77a-3812f9926728'.
   > java.lang.NullPointerException (no error message)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
21:11:29: Task execution finished 'DownloadSources'.

Here is 2 pretty long task outputs:

Idea.log https://pastebin.com/EQcDxPwb

Current thoughts - this issue relates to IntelliJ, not to Gradle/maven since the same issue I faced while making a new project from scratch on maven build tool and I made the request to IntelliJ: https://intellij-support.jetbrains.com/hc/en-us/requests/2686145

Could you please help me to realize what should I do to fix it?

The problem belongs to Scala plugin. If you face this issue, it doesn’t matter on build tool you are using Maven or Gradle probably installation of the Scala plugin solves your problem.

My Intellij report: https://intellij-support.jetbrains.com/hc/en-us/requests/2686145

Well-known bug: https://youtrack.jetbrains.com/issue/IDEA-127193