I can't really tell what the proble is but I can give you a sequence of steps that can help you troubleshoot.
First, change all compile
to implementation
. Although this is not the reason why your gradle is failing to resolve, it can still give you insight into the problem.
Next, remove redundant dependencies. Remove dependencies if you don't need them. This would help lighten the load so that you have a narrow list of dependencies to debug. Also, I couldn't help but notice that you have two support libraries. Remove one.
Next, look at the part of your build.gradle file that is highlighted (for example, the classpath). These are warnings/recommendations. If you hover around them, you'd see suggestions from android studio telling you what you could do better. Follow all of these instructions to the letter. Most of them would advise you to make the versions of all your dependency tally. Obey.
Finally, after doing all of this, I'm pretty sure the problem would have been solved. You can simply clean the project after all of this.
I really hope this works for you.. Merry coding!