Petreus is not running for office. This may be a political ad, but it is not about any campaign, and therefore election laws don't apply.
MoveOn.org is a registered PAC, so any ads they run are political in nature and subject to FEC regulations. The NYT, in essence, gave a large donation to MoveOn.org.