Trump has struggled to persuade Americans to back the war, which has triggered a surge in energy prices, killed American servicemen and Iranians, and further eroded his standing among voters.