The announcement came amid a purge of leadership at the Pentagon and a stalling war effort against Iran.