Gradle sync failed while creating a project

Hello, i am using Android studio and after creating a new project its show gradle sync failed and show No cached version of available for offline mode. and i enabled offline mode but its still showing this .

please help me to fix this issue because in next week i have to submit assignment in our college for internal assessment and i dont want to lose marks please help me.

here is the screenshot of the gradle sync failed

I am also getting same error waiting for solution

still having the same problem