If we faced something that large domestically it might be a matter for a state’s National Guard or multiple NG units. NG forces can also be “federalized” so that needed units can be brought across state lines. However, NG units vary a lot in composition and force structure, I believe, and many might not be suitable for such an attack on a terrorist hideout that might be armed with RPGs and much more. Some numbers of NG units are not really “infantry” but more specialized units.
We have the “Posse Comitatus Act” which prohibits use of the military forces for domestic law enforcement, although I’m not sure what the exact military role is allowed to be post-9/11. For instance, the issue of fighter aircraft possibly downing hijacked planes certainly arose, so there has been renewed debate about potential US military involvement domestically in a terrorist emergency, but I don’t know how the post-9/11 laws stand on that. I will try to look it up.
https://en.wikipedia.org/wiki/Posse_Comitatus_Act
I’ve been wondering why we don’t treat jihadists as insurrectionists. Same with Antifa, since their intent is the overthrow of the gov’t. In that case, couldn’t the military be used? And we could hang the bad guys instead of putting them in jail for years?