I'm looking for the title of a book about a human who is abducted by aliens and his brain is transplanted in an alien fighting machine or tank.
Most likely A Plague of Demons by Keith Laumer. The protagonist's brain is harvested by doglike alien "demons". It, along with other brains taken from dying soldiers on battlefields across the centuries, are enslaved and implanted in massive alien tanks and forced to fight in wars on distant planets.
This blurb taken from Goodreads talks about the first half of the book, before the Giant Alien War Machine part of the plot:
When John Bravais was sent on a secret mission to observe a war in North Africa he found out more than it was safe for him to know - even after he had secretly been surgically transformed so that he was as strong as a Bolo tank, and nearly as tough: Wolf-like aliens, invisible to the ordinary eye, were harvesting the brains of the fallen fighters! Brevais might have become the Ultimate Warrior, but still he was only one man against A Plague of Demons.
Apparently, it's available to read on the Baen Books site.