Army Gen. David Petraeus said in a speech at Princeton University that after more than eight years of fighting in Afghanistan, the U.S. finally is getting enough troops, diplomats and organizational structure to be able to keep extremist groups from taking over again there.