This is one of the most common Android Studio error :
No cached version of com.android.tools.build:gradle:x.x.x available for offline mode
Your gradle offline mode is enabled. You need to turn if off. Otherwise android studio will not download a new gradle version if it is not available locally.
How to turn off offline mode :
I am using one theme for my Android Studio. So, it will look bit different on your system. You can hover on a icon to find out what it does.