Probably the most comprehensive story about how close (or not close really) a peace deal was in 2022. Main issues that prevented were severe limits proposed for Ukrainian military power, a mandatory pull back from the borders of occupied territories, and Ukraine's ability to enter into defense pacts that would have other countries come to their aid directly in the event of further Russian aggression in violation of the deal.
Ukraine is unlikely to ever agree to any deal that precludes the basing of European military forces on its territory to enforce the terms.