Can’t execute ./gradlew clean

I’m currently working on my react native project and wanted to build apk to send my friend. I did everything according to this instruction https://reactnative.dev/docs/signed-apk-android and some video on youtube.

Everything worked fine till the moment when I tried to execute ./gradlew clean and then another command starting with ./gradlew. It just starts downloading it from https://services.gradle.org/distributions/gradle-8.3-all.zip and then fails.

I tried downloading it manually and everything seemed good, gradle -v command works fine from any console, but ./gradlew command still do the same.

I would be really grateful if someone could help me