Up front, I do not like Donald Trump the person, or for that matter John McCain the politician, but on the other hand, I have found no actual quote of Trump saying John McCain was not a war hero.
The controversy, from Boston Herald: 
GOP presidential candidate Donald Trump took shots at John McCain’s military history on Saturday, arguing that the Arizona Senator was “not a war hero.”
“He’s a war hero because he was captured,” Trump said. “I like people that weren’t captured.”
McCain, who was a prisoner of war in Vietnam for six years, recently criticized Trump for stirring “the crazies” for his controversial remarks in recent weeks.
Trump did not appear to slander McCain. Although Trump did ignorantly impugn McCain. Trump said that he prefers soldiers who were not captured. The Code of Conduct requires that our soldiers never surrender. Attempting to evade capture and failing is not surrender. It is not dishonor. It not conduct for which a soldier should ever be criticized. The fact that Trump impugned McCain for the fact that McCain was captures, shows Trump to ignorant, and unfit to serve as Commander-in-Chief.
McCain was shot-down and ejected over enemy territory. As for as I know, all our airmen who ejected over North Vietnam, and survived, were captured. I fact, three of them went on to receive the Congressional Medal of Honor based on their conduct as prisoners of war. Being captured did not make McCain a hero. Flying off a carrier into enemy territory, and hopefully back, is heroic. Building casinos that go bankrupt in Atlantic City is not.
Trump knows how to spot the enemy. Sadly he fires before he aims, and is the Fearless Fosdick of politicians.
As for McPain, we might have prevailed in Southeast Asia, if McCain had managed to drop as many bombs on North Vietnam as a naval aviator, as he did on his fellow republicans as a politician.