Translation:أَهْلاً يا فَريد.
Not really. It's a subject of personal choice I'd say. Some people might prefer one way rather than the other. However, from a religious point of view, السلام عليكم (as-salamu 3alaykom) is the official greetings and it means (peace upon you). Before Islam, Arabs used to use various ways of greetings (and maybe some of them had a tint of paganism in them, not sure), but with the rise of Islam, prophet Mohammed advised to use (peace upon you) because the faith itself is about peace.
Anyway, all in all, all greetings (such as صباح الخير خق أهلا or مرحبا or سلام) are common all over the Arab world and I'd say it's just a personal choice.
The variation might occur at (How are you?); This might differ from one dialect to another.
From the way you typed أهلا it seems your friend is from the Levant (most probably Lebanon I guess or Syria).
To begin with, the formal greeting is سلام (salám: peace). Yes, (Ahlan) can be used more as (welcome) but I've been with people who use it as (Hi). This includes the full phrase of أهلا وسهلا (Ahlan wa sahlan). It's used as "welcome".
(Marhaban) مرحبا is used as (Hello) - In dialects right now, the Tanwin at the end (-an) is dropped and they would say simply (Marhaba) or (Merhaba). This is used in Turkish greetings as well.
So, in short, (Ahlan) can have a double usage.
The good news is that Duolingo finally started to put the Tanwin marker.
The (n) sound you hear is kind of a vowel. It's called Tanwin or Nunation (there is a wikipedia article about it). Presumably, in archaic Arabic, this sound was a nasal sound but then developed into a full "N" sound in later times. Akkadian, an extinct Semitic language, had a similar feature but with an "M" sound (hence it's called Mimation).
Now, Tanwin in Arabic has several uses. As I've stated it is a vowel and not a consonant letter and not an original part of the word. Tanwin can come in flavors: -an, -in, and -un; It depends on the grammatical cases.
For starters, with nouns (many of them not all), Tanwin can be imagined and visualized as the equivalent of the indefinite article (as in English a/an). Thus, let's say you want to say a dog, in Arabic that would be كَلْبٌ (kalbun), but the dog would be الكَلْبُ (al-kalbu).
There are other uses for this Tanwin and it has varios implementations, and can be seen in adverbs.
The word here, أَهْلًا (ahlan) is in fact an adverb and it is kind of a shortening for a full sentence. It stands for (as a family). The full sentence that was used in old times is: قدمت أهلا وحللت سهلا (qadimta ahlan wa Halilta sahlan), literally meaning: you've come as a family and may you settle down with ease (among us); It was a common welcoming expression. In time, the whole thing got abbreviated to أهلا وسهلا (ahlan wa sahlan), and sometimes أهلا alone is used to welcome, as well as to greet.
It's a nice thing to see Duolingo contributors are fixing these. As far as I remember, sentences had Tanwin but contributors didn't put the markers for Tanwin on words. Probably this is changing now.