Besides a woman's name, Ilya afaik is also the Russian word for a species of flower. But with the little I know of Russian, trying to approach the pronunciation to what I'd expect it to be, it sounds like the female form of Julius, Julia, if I was to pronounce by Norwegian logic, the language not being geographically too far from the Slav ones.
And it wouldn't be the first name I see that changes for some random reason. For example, to my knowledge, the male name Tiago comes from a long line of mispronunciations starting at Jacob/Jacobus.
So going by that, it makes me think, could those two names, Ilya and Julius, be related? Or would their phonetic similarity be a coincidence?
It's coincidence.
Ilya: from Russian Илья (Ilya), borrowed from Greek Ἠλίας (Ēlías), borrowed from Hebrew אֱלִיָּה (Eliyáh). It's typically a male name, although in English I wouldn't be surprised if people named some women "Ilya" because it ends in -a. I'm not aware of any flower with this name, but I don't speak Russian, so take it with a grain of salt.
Note Christian names in Russian often follow this same "double borrowing", just like Christian names in English most of the time follow a Hebrew → Greek → Latin (> French) → English path instead.
Julia: feminine of Julius, from Latin Iulius. The etymology is disputed, but apparently it comes from Iouilius (lit. "Jupitery", i.e. associated with the god Jupiter). Either way it's older than Christianity, and actually native in Latin, not borrowed.
Also, it wasn't a personal name in Classical times. It was a gens name; roughly a surname. That Julius Caesar for example was from the gens Julia, and his personal name was Gaius.
For a better example of weird etymological cognates: Ivan vs. John vs. Giovanni. They all ultimately backtrack to Hebrew יוֹחָנָן (Yoḥānān).
The key change here was rebracketing, the same change that transformed English "a napron" into "an apron". To explain it further:
Names of saints in Galician, Portuguese and Spanish are preceded by "Santo" (M) or "Santa" (F), but:
I'll give you some examples (from Portuguese for my own convenience):
Now, back into "Tiago". You got Latin borrowing the Greek borrowing of the Hebrew name יַעֲקֹב (Ya'akob). In Latin it became Iacob, Iacobus, Iacomus (yup, it was a mess.) That "Iacob" form evolved naturally into "Iago" into those languages. (Spanish also spells it as Yago.) Right?
But he was a saint. So you got to add "santo" to his name. It falls into the first case there, since the name starts with vowel: Santo Iago ~ Santiago. But there are so many versions of the name that people lost track of what it was supposed to be, so they interpreted it as "san Tiago" instead of "santo Iago". Then you get people naming their children after saints, and the name Tiago pops up.
Wow. Thanks for the explanation!