A six-year-old kid asked me this question yesterday, and I didn't know the answer. I guess jelly has always been spelled with a "J", but isn't it derived from the word gelatin?
There are primarily two reasons why two seemingly related words might be spelled with distinct differences:
- English adopts words from many different sources, and at different times. One word may be adopted from Latin while the related word is adopted from German, eg. Or, as is apparently the case here, the two words may be adopted from the same language at different times, and even if the words haven't changed in the source language, the "rules" (such as they are) for transliterating the foreign word into English change over time. (This is especially true for French, as words imported as a result of the Norman Conquest in 1066 were treated differently from words simply "borrowed" at other times.)
- The spelling of English words was not "fixed" until about 1800. Prior to the invention of the printing press in 1440, letter writers and scribes pretty much chose their own spellings for many words, using a combination of phonetics and assorted traditions (and often would even spell the same word differently at different places in a single document). As printing (and literacy) became more common, spellings began to be more "settled", but it was another hundred years or so before dictionaries began to be compiled, and it wasn't until 1755 that Samuel Johnson compiled what is often considered to be the first "modern" dictionary. Noah Webster's dictionary, which settled many US spellings, wasn't until 1806, and OED wasn't complete until 1928. By the time these dictionaries were written many "misspellings" (as you might consider them now) had been canonized into the language.