As the war in Ukraine approached its first anniversary, the Pentagon’s top officer, Gen. Mark A. Milley, assessed the carnage that had followed Russia’s full-scale invasion: With more than 100,000 soldiers likely killed or wounded on each side, he said, there was a “window of opportunity” for the combatants to hammer out a deal.