To remove the invalid SP group providers, you would need to manually delete them from the database. Kindly follow these steps:-
1. Stop the K2 Service.
2. Make a backup of the K2 DB.
3. Delete the invalid group provider record from the HostServer.GroupProvider table.
4. Start the K2 Service.