This is one of the main topics of discussion in the endless “Ukraine debates” on this blog, though not one that I usually participate in due to lack of qualification in this subject.
That said, I recently saw a very interesting article that I believe definitively answers the question.
While supporters of the Ukraine’s Polish slant/Western identity often cite the following graph of lexical distance, which appears to show Ukrainian as being closer to Polish than to Russian…
… the problem with statistical analysis of how close words are to each other is that “cultural innovations” in one language can create the appearance of rapid divergence between otherwise closely related languages.
This point is well illustrated by linguist Asya Pereltsvaig in a blog post from 2014, where she explains this in terms that non-specialists can understand.
For instance, based on the names of the different months, one might conclude that Russian is in an altogether different cluster from Polish, Ukrainian, and Belorussian.
The reality, of course, is that Russian adopted Julian calendar terms, while the Poles and White Russians and Little Russians retained the Slavic originals:
However, this view results from an incorrect interpretation of the data. Rather than being testimony for the closer link of Belarusian/Ukrainian to Polish than to Russian, these data result from the fact that Russian adopted the month names of the Julian calendar, while the other three languages generally retained the original Slavic terms… the earlier Slavic names for months “show etymologies … reflecting various aspects of flora, fauna, climate and activity”. For example, the term for February derives from ‘bitter, fierce’ in reference to the typically cold weather of the month. The term for ‘July’ comes from ‘linden tree’; interestingly, Russian has the word lipa for ‘linden tree’ but it does not preserve the month name based on it. Likewise, ‘September’ is the ‘heather’-month, while ‘November’ is the ‘leaf-falling’ month. The other month names that are not shared between the three languages—Belarusian, Ukrainian, and Polish—may come from different roots, but they too have weather- or activity-describing etymologies: for example, the name for ‘August’ in Ukrainian and Polish comes from the word for ‘sickle’ (cf. Russian serp‘sickle’), while in Belarusian it derives from the root for ‘reaping’. Similarly, the names for ‘October’ in Belarusian and Polish derive from two different words for ‘flax’, while the Ukrainian term comes from the root for ‘yellow’. Crucially for our argument, the shared cognates across Belarusian, Ukrainian, and Polish are shared retentions, not shared innovations; lexicostatistical methods often take this sort of data—mistakenly!—to be evidence of common descent.
Russian has borrowed heavily from Finnic and Turkic languages, as well as Old Church Slavonic (the latter, I think, explains its short lexical distance from Bulgarian).
Even so, the three East Slavic languages share phonological commonalities that make them far closer to each other than either is to Polish, or other West/South Slavic languages:
The first such phenomenon is the so-called pleophony. As a result of a complex series of changes, East Slavic languages ended up with sequences -oro– and -olo- (in roots of words), whereas West Slavic languages have corresponding -ro– and -lo-. Compare, for example, the Russian k orova ‘cow’ and z oloto ‘gold’ to Polish k rowa and z łoto. Importantly, Ukrainian and Belarusian follow the Russian pleophony pattern: for example, ‘cow’ in Ukrainian is korova and in Belarusian karova; ‘gold’ in Ukrainian is zoloto and in Belarusian zolata (generally, Ukrainian does not reduce vowels the same way Russian does, while Belarusian does reduce vowels and reflects the vowel reduction in spelling as well; as a result, Russian words are spelled like the Ukrainian ones, while their pronunciation is closer to their Belarusian counterparts).
Another phonological pattern that groups the three East Slavic languages in contrast to Polish (and other West Slavic languages) is the treatment of nasal vowels inherited from Proto-Slavic: in the East Slavic languages these vowels have lost their nasal qualities, whereas Polish has retained nasal vowels. The back nasal vowels, essentially the short and long nasal o-sounds, have been replaced in East Slavic by /u/, as in r uka ‘hand’ and z ub ‘tooth’ (shared by all three East Slavic languages). In contrast, in Polish these have become the nasal e- and a-sounds, marked in Polish orthography by the hooks under the corresponding vowel letters, as in r ęka (pronounced /renka/) and z ąb (pronounced /zamp/). Similarly, the short and long nasal e-sounds have turned into /a/ in East Slavic, as in p’at’ ‘five’ and r’ad ‘row’ (subsequently, in Belarusian the “soft” r-sound has been turned “hard”, as in rad ‘row’). The corresponding forms in Polish feature nasal e- and a-sounds, as in pięć ‘five’ (pronounced /pjenč/) and rz ąd (pronounced /žand/). Once again, Belarusian and Ukrainian pattern with Russian rather than with Polish.
So, Belorussian, Ukrainian – much closer to Russian than to Polish. But superficially appears more distant on account of differential vocabulary borrowings.