The podcast mentioned above is a good summary of the 40 odd years of debt non-payment by the UK government.
Various periods of sanctions have been used as a reason for non-payment, but the USA paid off a debt to Iran to get some of its citizens released years ago - and last year the UK pulled out of an agreement with Iran at the request of the USA who wanted to co-ordinate hostage releases - partly tied to the renewed nuclear deal negotiations (post Trump). That fell apart and, as I understand it, the UK government decided not to tailgate the USA but go ahead with unilateral negotiations. It seems that came down mainly to paying the debt. It could have happened years ago. Zaghari-Ratcliffe didn't have to be a pawn in a political game.