You must drop the distribution against a published database
The regular script is the following:
Use [master] EXEC sp_dropdistributor @no_checks = 1
If this message appears:
Cannot drop the distribution database ‘distribution’ because it is currently in use.
Then you can correct that by using the following script:
ALTER DATABASE Distribution SET SINGLE_USER WITH ROLLBACK IMMEDIATE Use [master] EXEC sp_dropdistributor @no_checks = 1, @ignore_distributor = 1 GO