That's not really true. Petraeus has always stressed that there is not a military solution to either Iraq or Afghanistan without a political solution. This is all about "winning hearts and minds." It's entirely political.
Remember Petraeus jumped on the bandwagon who claimed that disbanding the Iraqi army and the Ba'ath socialist party were mistakes. He took a popular political position in order to get the job he has. He was wrong about that too.
The military has known for generations of the issues related to occupying enemy territory. All of the “hearts and minds” stuff is in regard to that. Therefore, it’s the necessary civil part of a military operation, and it’s even a part of the military pre-planning.