How to change gradle version on Microsoft Visual Studio

Hello, I am trying to solve an issue of “Could not find method implementation() for arguments [com.google.firebase:firebase-core:16.0.1] on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@7e51eb.”

Stackoverflow have given a solution by updating the gradle version that VS is running on. However, when I make amendments to gradle-wrapper.properties itself, it gets changed back to the previous version after “run”. How do I go about changing the versions? Thank you so much in advance