Try dropping the distribution database via the cleanup sp, this effectively runs the menu command 'Remove Publishing and Distribution' but bypasses the checking. Run
USE master
GO
EXEC sp_dropdistributor @no_checks = 1
GO
You should then be able to rename your SQL server with
EXEC sp_dropserver ''
GO
EXEC sp_addserver '', 'local'
GO
but don't forget to restart the services or it won't take effect.