The law will end the immunity for former and serving members of the Armed Forces brought in by the Conservatives.