According to the stack trace, maybe the problem is in this plugin.
I think there have been quite big changes between these two versions. Maybe it would be better to upgrade incrementally, i.e., to version 4, then 5 or minor increments. You can read more in the migration section of Gradle’s documentation.