Seems like a long standing problem in Gradle:
I have no idea why it happened now and didn’t show up in earlier versions.
Try to use the suggested approach with adding pluginManagement section to settings.gradle, for example:
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
}
}
rootProject.name = 'onboarding'