I am finding extreme difficulties in following your logic.Ukraine gained independence on 1991 if I am not mistaken on promises to destroy all nuclear armament which they did to honor the deal brokered exactly by Russia,Boris Yeltsin back then.Since then Ukraine is a free country and is free to join NATO or do whatever they like in their territory without asking permission from anyone be that a neighbor like Russia who demanded that they stay out of joining NATO.
Russia wagered a war to annex parts of Ukraine and this is starting a war,Ukraine was at peace,it is the aggressor in this case Russia who put them to war and I agree with Zelenksy,no one tells me what to do in my own home.
if that is your logic, then can Cuba join a military alliance with Russia?
Cuba is also an independent country.