The press seems to have latched onto General Petraeus' seeming opposition to Obama's position on withdrawing troops as a rallying cry as to why Obama is wrong on Iraq (despite the increasingly Obvious endorsement of Obama's general plan by the Iraqi government itself).
However, there are several problems with relying so much on General Petraeus' opinion on the matter.
Reason 1: What is the role of a general?
One of the things the press seems to have bought in to, largely because of Bush's incessant repeating of the idea, is that the "generals on the ground" is the ultimate, unbiased, objective advice that should dictate what we do in Iraq.
While this is true to an extent, it is only largely true when generals are coming up with the best way to implement the strategy or mission chosen by the President. In other words, the President has final say on what the mission is. It is the general's jobs to implement that mission in the best way.
For example, Bush's and McCain's missions are to "win" in Iraq (however that is defined). It is thus the general's job to decide what strategy and tactics should be used to succeed with that mission.
The problem with asking General Petraeus what he think's about Obama's mission is that that's not his job. He is focused on implementing Bush's mission which is fundamentally in opposition to Obama's proposed mission. As a result, it would be no surprise that the tactics that Petraeus is using for Bush's mission wouldn't work well for Obama's and vice versa.
However, this does not mean that Obama's mission can't work, because it's not Petraeus' job to make that decision.
Reason 2: The military is not monolithic
The second problem with relying on General Petraeus' opinion alone is that he is not the only person in the military who may have an opinion on the matter. Yes, he may be in a position to know more about Iraq than anyone else, but that doesn't mean that no one else's opinions matter.
The military is just as a diverse of place as anywhere else. If you can find a general who believes one way on a certain matter, you can probably find a general who believes otherwise. As a result, taking the opinion of one general and somehow trying to make that "the military's position" is a dangerous thing to do.
Reason 3: The reason General Petraeus is in charge to begin with
The third, and perhaps most important reason, why General Petraeus' opinion on the matter shouldn't be made to be supremely important is the fact that he holds the position that he does for the very reason that he supports Bush's position.
The reason that bush replaced General Casey with General Petraeus in the first place is because General Casey doubted that the surge would work while General Petraeus supported it.
If General Petraeus suddenly changed his mind, then Bush would replace him with yet another general who agreed with him. Taking this into account, there is no surprise that the general in charge supports Bush's, and by extension McCain's, position on the matter since Bush is the one who selects who is in charge to begin with, and it isn't surprising that he has appointed someone who agrees with him.
As a result, even though those in top military positions may have the most knowledge of what's going on, they're the military officials whose opinions shouldn't be taken at face value the most in a political discussion because their appointments are, for the most part, political appointments within the military.
It would be like asking Secretary of State Rice what her opinion is on a matter, and then holding up her opinion as if she's an unbiased and objective observer because she's a "very important position" who is in a position to know the most about the given situation.
Of course she's going to agree with the President on the matter because that's why she has the job. The same thing is true of General Petraeus.
As a result, while "Listening to the Commanders on the Ground" is definitely something important for the President to do in order to figure out the best way to implement their mission, those same commander's words become less reliable and objective when they are injected into a political debate.