There does not seem to be any mention of the apparent rename of the com.gargoylesoftware.htmlunit package to org.htmlunit in either the release notes or the migration guide. In addition, the documentation still has references to that package, e.g. https://www.htmlunit.org/gettingStarted.html:
The class com.gargoylesoftware.htmlunit.WebClient is the main starting point.
This is a bit confusing.