You know that line in the MDK that says not to edit anything above it (indicating the buildscript block) that you messed with? Yeah reset that to how it comes in the MDK.
The buildscript is entirely separate from the rest of the build.gradle, it signals what Gradle is going to need to set up to be able to interpret the rest of the file, so if you need to add a repo to your project, add it to a repositories block OUTSIDE of buildscript.