Ukraine is the country under attack
Yes, the Nazi-run Ukrainian government started attacking the Donbass region of Ukraine in an attempt to ethnically cleanse that region of the majority Russian-speaking population. Fortunately, Russia eventually entered into that civil war on the side of those people.
supporting the nation that is a direct victim of imperialism is preferable
Then you should be supporting Russia, since it is the country opposing the imperialist US/NATO (which I hope you have a better understanding of, given SeventyTwoTrillion’s response to your other comment). Ukraine is being privatized and sold off for pennies to western the Bourgeoisie even when those same western interests have blocked all attempts at peace at every turn, perpetuating the war as long as they still have Ukrainians to sacrifice.
even if that involves the lesser evil of alignment with the US military.
lol. The US is the greatest evil here, the evil that couped Ukraine’s government in 2014, who has funded neo-nazis there since even before, who has stymied peace over and over, and indeed is the main reason this war even started.