In your command prompt, check if the gradle -version command returns the version 4.9 of Gradle.
If it doesn't, then install that version instead, then check the version again and proceed to the gradlew genEclipseRuns etc. steps again.
If it does, try to reinstall Gradle 4.9 anyway. After a quick search, this apparently solved the issue for someone in the past.
If you are running a system with limited RAM, this could be the issue as well.
In any case, I don't think I'll be able to help more than that sadly.