A multi-million-pound contract to remove the iconic masts of a ship which sank laden with explosives has been announced after years of delays.