Maybe it got it from a different repository before, or you use a dynamic version somewhere, or maybe it has to check whether it is still available in that repository or was removed regularly.
In both cases Gradle has to check online in the repository.
If it is really in the cache from that repository, you can use
--offline
to force Gradle not to check the online repository but only use already cached dependencies and plugins.