Just a pronunciation question. Is it a vestige of the spelling battle between i and j, where in English the j lost out to the i, but with soldier we retained the sound?
As others have mentioned, the pronunciation of soldier as /ˈsoʊldʒər/ is due to coalescent palatalization of /dj/ to /d͡ʒ/, a process that occurred in some contexts in most varieties of English (and that still occurs as a basically productive process between word boundaries in fast speech, as John Lawler mentioned).
It's related in a very general way to the reason why we pronounce words spelled with the letter "j" with /d͡ʒ/, but it's not directly related in the way that you suggested (that is, I don't know of any evidence supporting the idea that the use of /d͡ʒ/ in this word was based on a spelling with "j", or based on the graphical connection between "j" and "i").
It's a bit unusual that "di" is pronounced /d͡ʒ/ in "soldier": in most words spelled with "di" followed by a vowel letter, the "di" is instead standardly pronounced as a separate syllable /di~dɪ/ (for example, in the pronunciations of words like radiant, Canadian, melodious) which can optionally be compressed to non-syllabic /dj/.
However, there is clear evidence that pronunciations with /dʒ/ existed instead of or alongside pronunciations with /di~dɪ/ for many words with the "di + vowel" spelling pattern in the past. For example, the spelling "Injun" represents a variant with /d͡ʒ/ of the word "Indian"; this /d͡ʒ/-variant came to be seen as colloquial (or in modern times, offensive).
The sound /d͡ʒ/ from former /dj/ occurs more regularly in words spelled with "du", such as "education" or "procedure".
The thing is [t] and [d] started palatalizing and later to merge with the following [j] producing the affricates [tʃ] and [dʒ] already in the eighteenth century. First [t] became [ʃ] in words like nation, then, later, the palatization extended to other environments (words like nature, mutual etc.)
Nowadays jod-coalization is becoming the norm also in stressed syllables tuesday sounding like "choose day", homophony between dune and june etc.
Well, speaking of soldiers, Elvis Presley's second album after he finished military service attempted to cash in on that stint by being called G I Blues.
One song included in it was called "Didja' Ever", which is a spelling used to reflect the fact that some people would pronounce "did you" as "didja".
The same palatisation that sometimes produces a /dʒ/ in "did you", long ago produced on in soldier so that this became the received pronunciation.
When you pronounce a "d" before an "i", you are really pronouncing a "d" before a "yee". In Hebrew the "Yod" (yohd) is really a "yee" sound. In Greek the "Iota" (yee-oh-ta) is really a "yee" sound. In English the "Y" (wai) is really a "yee" sound. Therefore, soldier is "sold-yee-er", said quickly becomes "soljer." This is also how the "J" got added to the English language; they started adding the "d" sound before the letter "I" (pronounced as "yee", so it became dyee, which became "j"), especially at the beginning of words. In the 1611 King James Version of the Bible, the name was Iesus; shortly after (in the 1600's) it became Jesus.