You can't attack a CoG without conducting offensive operations. As much as Ukraine is holding their own, they're not capable of doing that.
This war ends whenever Putin gets tired of fighting it, which is the same strategy employed against us in Iraq and Afghanistan.
IMO, the war will end when Putin's forces are thoroughly ground down, which they have already been significantly. Iraq and Afghanistan the U.S. had the capability to conduct indefinitely because our country is far richer and the damage to the military in terms of casualties and equipment loss were tiny in comparison to this war. Russia has lost pretty much about 100,000 personnel so far and 1400 tanks thus far, along with other vehicles and equipment. And these personnel were their best soldiers. Their industrial base is far weaker than the West's and they are dealing with heavy sanctions. They are getting help from China, Iran, and North Korea, but that likely only will amount to so much.
Meanwhile, Ukraine is getting continued support from the West. The West needs to hold out and continue their support and hopefully the Ukrainians can grind down Putin's remaining forces. Putin has been able to pull about another 200,000 troops via conscription and offering prisoners the "opportunity" to fight, but the level of training and equipping of those troops is going to be very questionable. Putin clearly couldn't supply his "professional" forces, so supplying another 200,000 is going to be a big challenge.
Also questionable is their will to fight. This isn't World War II where the Germans were burning entire villages and mass killing the people and the Soviets were psychologically invigorated to fight back to save the nation. That is the Ukrainians this time. The Russians are just having to fight because Putin says so.
Putin's forces seem to be amassing in the East of Ukraine for a likely major offensive soon (provided this isn't a deception like the Ukrainians pulled last fall). So how both sides fare in that will be a determining factor as well.