The Forever War by Joe Haldeman, 1974 St. Martin's Press hardcover first edition
Source: Guest9999 on Wikipedia
As humans expand beyond Earth and begin traveling through space at nearly the speed of light to colonize other planets, they encounter and come into conflict with an alien civilization dubbed the Taurans. William Mandella, along with the rest of Earth’s most promising minds, is drafted into military service to be sent into deep space to engage and defeat the Taurans.
Given the physics of space travel, however, Mandella and his comrades hardly age at all while decades and even centuries pass on Earth and the colonized planets. With each campaign, Mandella realized he’s loosing whatever connection he had to protecting Earth as it becomes less and less recognizable over time, and the perpetual, senseless conflict with the Taurans never seems any closer to victory. Mandella desperately clings to the few vestiges of his life that give him any reason to continue even as the Earth government, the war, and physics work to rob him of those reasons.