Yes and no. The Iran war is deeply unpopular and won’t even pass congressional approval for money. It’s being fought from pocket change budgets because they know they can’t pass a funding bill for it. Also not the same kind of war.
Any period time? US waged war for 20+ years in Afghanistan. Pretty effectively! To what end? Not an end an army can really achieve so… there you are.
But a war that might actually be popular? To save the world from communist dictators and make sure we have chips for our precious devices? I wouldn’t count out the United States. Or nuclear weapons, which still exist and are a thing.
That was an occupation and a low intensity “pacification” mission. Waging a prolonged war against a military peer on the other side of the continent is a bit more problematic (considering that US is/was on the brink of running out of advanced weaponry in Iran despite having aerial superiority which they won’t over Taiwan, Japan would have to get involved as well cause otherwise US would have to entirely rely on the fragile carrier fleet).
Using tactical nukes (even regardless of the extreme geopolitical downsides that might bring) wouldn’t necessarily give a great tactical advantage either, unless they are willing to do that over Taiwan itself to destroy the landing forces).
And it'd be the kind of war the US is best at. Boots on the ground, against conventional military, with a civilian population that is on the side of the US forces
No guerilla warfare, no insurgents, no need for extended beyond-visual-range warfare that depletes missile stockpiles
Last time used faced a conventional military that could actually challenge it was in Korea.
It won’t have complete areal superiority or entire division surrendering after running into contact with US forces like they in Iraq. “Shock and awe” of course can be very effective just probably not against China. Even now US is running out of materiel against Iran and can’t really sustain a prolonged intense conflict while being able to protect its gulf allies from ballistic missiles and drones.
Iran is not a war funded by congress, so it's really no wonder the US appears inneffective. Trump didn't get the support he thought he would from congress and now he's flailing around trying to save face.
Change the leadership (which will happen soon) and when there is actual support from congress to fund and intervene in a conflict in Taiwan, then you will see a vastly different US military response.
The war over Taiwan wouldn't be done by soldiers on Taiwanese soil. So you wouldn't need many boots on the ground in a literal sense.
But if you mean in a metaphorical sense, how long until the 7th Fleet could get to Taiwan, the answer is 0 days for first response, 3 days for everything located in Japan, and less than a week for the full mobilization of the 7th Fleet (that's 50+ ships and nearly 30K soldiers). The entire Pacific fleet could be there in a week and a half.
(Granted, we're assuming competent US leadership, which is not the current administration.)