I believe the install task was part of the legacy maven plugin, which has long been deprecated and was removed in Gradle 7.
Did you used to use the maven plugin and replace it with maven-publish when you upgraded to Gradle 7? If yes, then use the publishToMavenLocal task.