I think I know what is wrong with your build script. You probably use builscript block to configure Android Gradle Plugin.
In this case Kotlin/DSL doesn’t generate static accessors for dynamic Gradle stuff (like dependencies configurations). Please check this example:
And especially settings.gradle (you need this configuration because Android Gradle Plugin not published to gradle plugins portal