Cannot initialise the project derectory

when i put the gradle wrapper in a folder then try to initialise the project by command ./gradlew init this error msg displays. what does this meaning and what should i do?

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 858ms