The Taliban ruled 90% of Afghanistan at the time the 9/11 attacks occurred, effectively making them the country's national government. Al Qaeda and the Taliban had very close ties, and many of the same goals. Al Qaeda fighters were, in fact, integrated with the official Taliban army, there is no dispute over this. The Taliban also protected Al Qaeda members in Afghanistan after the US Embassy was bombed in the late 1990s, and then again after the attacks of 9/11.

It is technically true to say that the government of Afghanistan (such as there was) never declared war on the United States, but it's also technically true that the United States never declared war on the country of Afghanistan, rather, they assisted the Afghan Northern Alliance in defeating the Taliban militarily (for a while, at least.) Both of those statements are disingenuous, because the net effect of the United States action in Afghanistan was that of war, and the net effect of the Taliban's complicity in the 9/11 attacks (and their refusal to distance themselves from Al Qaeda afterwards) was that of war.

I'm certainly much more dove than hawk, but I think your argument hinges on a bunch of technicalities about who actually represented the country of Afghanistan or the Afghan army at the time. If it wasn't the Taliban, who was it?
_________________________
- Tony C
my empeg stuff