Sir Keir Starmer’s Troubles law is a threat to the morale of the Armed Forces, the former head of the Army has claimed.