I don't have enough reputation to comment so I'll post this as an answer.
After you Invalidate and Restart have you tried Build->Clean Project and rebuilding then syncing again?
Have you tried restarting your computer to turn of any processes that may keep caches from clearing?
Have you tried upgrading your gradle version as well (inside your gradle-wrapper.properties)?
Have you checked if your gradle path is correct at File -> Settings -> Build, Execution, Deployment -> Gradle?
Have you tried locating your gradlew and doing a
gradlew cleanBuildCache
?Have you tried removing the
C:\Users\{Your Username}\.gradle\caches
folder?Have you tried disabling cache building altogether (will slow down your build and is not recommended)? To do this you have to go to your gradle.properties file and set
android.enableBuildCache=false