After a long search, a colleague was able to find the solution to the problem.
A .gitattributes file was committed in the project. In it, the *.jar files were configured as Git LFS files.
*.jar filter=lfs diff=lfs merge=lfs -text
Due to a merge, the gradle-wrapper.jar file was destroyed and could no longer be read.
After deleting the configuration for *.jar files and recreating the gradle-wrapper.jar, ./gradlew can now be used without an error.