Availability replica '%1!s!' cannot be removed from availability group '%2!s!', because this replica is on the local instance ...

Availability replica '%1!s!' cannot be removed from availability group '%2!s!', because this replica is on the local instance of SQL Server.  If the local availability replica is a secondary replica, connect to the server instance that is currently hosting the primary replica, and re-run the command.