My take on this is that the USA will happily donate all the weapons and materiel the Ukrainians need to kick the Russians out and re-establish Ukraine as a sovereign territory on the 1991 borders.
Why?
1. It's a perfect testing ground for their military equipment, allowing them to get rid of loads of old stock/2nd tier equipment. This enables the military industrial complex to continue to justify their trillions of dollars of government spending, creates a demand for new first-tier kit, and supports loads of domestic industries and jobs.
2. It's going to put Russia out of the threat league for decades. When Putin goes either through illness or defenestration, Russia will break up into loads of factions and internecine conflict and the US wants to ensure there's as little decent military equipment as possible available to them. As the economy further collapses and whatever money is left is stolen by the kleptocrats, there won't be anything left to maintain the nuclear weapons and they will quickly become unusable. That's a huge threat off the table.
3. At a time when China is eyeing up its chances over Taiwan, it's a perfect practical demonstration of what US military muscle can achieve even when using second-tier equipment and non-American armed forces. Taiwan is vastly more important to the US strategically than eastern Europe, so it's a very powerful message to China "If we're prepared to do this to protect Ukraine, just imagine what we'll do to protect Taiwan"
And all this at no cost to American lives and remarkably little in budgetary terms. They have sent the equivalent of about $50bn in aid in 2022, or 6% of their 2023 military budget of £782Bn. In terms of what they will gain from Russia's defeat, it's a complete bargain.
As for how long this will take? It might drag on for another year, but when the end comes it will come very quickly. It's in America's interest for this to end decisively and enable them to focus on the Chinese threat.