Iraq was definitely invaded under false pretenses: "WMD".
Afghanistan was not: it really did have Al Qaeda training camps and the Taliban refused to do anything about it. Of course, you can argue that the US expanded the mission greatly from "squash OBL and AQ" to "overthrow the Taliban and turn Afghanistan into New Norway", which was doomed to failure, but the initial invasion (of the AQ camps) was justified. Don't forget, the US didn't just invade and take over all by itself: it partnered with some pre-existing rebel groups and helped them take over and set up a new government.
Iraq was definitely invaded under false pretenses: "WMD".
Afghanistan was not: it really did have Al Qaeda training camps and the Taliban refused to do anything about it. Of course, you can argue that the US expanded the mission greatly from "squash OBL and AQ" to "overthrow the Taliban and turn Afghanistan into New Norway", which was doomed to failure, but the initial invasion (of the AQ camps) was justified. Don't forget, the US didn't just invade and take over all by itself: it partnered with some pre-existing rebel groups and helped them take over and set up a new government.