This wouldn't have avoided war. Joining NATO and/or posting NATO troops in Ukraine would have done. This isn't about NATO it is about stopping Ukraine becoming a prosperous, Western democracy. Ukraine has too many Russian speakers and too close ties with Russia. If it prospers, Russian's will know and the contrast with their mismanaged country will be stark.
Of course had Ukraine been part of NATO then Russia would never have attacked Ukraine and I have never been one of those who claimed otherwise.
But there are plenty of members here who are convinced that Putin will be invading Poland next even though it is a NATO member.
Maybe you should have quoted one of those when they said it because plenty believed Russia would not stop after Ukraine.