This problem mainly occurs for countries or IP addresses that are subject to software sanctions by Google and its subsidiaries.
First, obtain a VPN with an IP address that is not under sanctions. Then delete the "android/.gradle" folder from the project and also delete the main ".gradle" folder of the system from the following location:
Windows: C:\Users\YOURUSERNAME\.gradle
Linux: ~/.gradle/
After that, connect the VPN and run the project.
It will take a few minutes for Gradle to download, and the project will run correctly.
Good luck!