So reading what you say, this is specifically what I think your friend is getting at with similarities to Harry Potter:
But the hero couldn't kill all the creatures and their leader. They
somehow managed to escape.
This plus "magic school" is probably what is making them think Harry Potter. The overall plot of Harry Potter is "once there was this big bad wizard who terrified the magical world. He died in a freak accident while trying to kill Harry and his faction was forced underground. But his minions are notably in hiding, not dead, and are still infesting the dark corners of the magical world waiting for their opportunity to return. Not to mention the big bad evil guy himself isn't quite dead and is trying to come back to life."
My protagonist belongs to one of the three last magical kingdoms of
world and is the descendant of a hero who once saved the World from
the creatures of darkness.
This is different from Harry Potter. In Harry Potter there are no openly magical states, merely subcultures hidden from muggle eyes. Harry also is the "chosen one" but there's no distinct heroic lineage present (there is the question of descent from Godric Griffindor, but it's never played up as a "lost rightful heir" or something similar, the books outright state that anyone who stands for Godric's ideals is an "heir of Griffindor").
I am trying to write that my protagonist is going to learn magic to a
imaginary place where the most powerful wizards live. But the journey
to that place isn't easy. And he will face a lot of difficulties in
that journey.
This is completely different from Harry Potter. The actual journey to Hogwarts is never very difficult in the Harry Potter novels, and is rarely a major component of the story. There is typically some pre-school kerfuffle or minor threshold guardian to delay Harry from attending Hogwarts, but it's never treated as a serious impediment and is usually resolved within the first hundred pages of the story (e.g., Dobby, the flying car, the dementor attack in Book 5, etc.).
I think the biggest thing is going to be that even bringing up the word "magic school" is going to immediately make the reader draw parallels to Harry Potter. Shameless self-plug, but the answer I gave to this question talks about the same thing: Harry Potter has become such a landmark of pop culture that any attempt to write a magic school setting is going to draw comparisons to Harry Potter, even if the plot is something otherwise unrelated like "Animal House with wizards" rather than "British boarding school for wizards" (Will people always compare a magic school idea to Harry Potter?). This is despite the fact that magic school settings aren't even uncommon, as The Magicians, House of Night, or Little Witch Academia will attest.
I never even read Harry Potter.
Read Harry Potter. Not just because of its popularity and because reading it is a good way to figure out what people will and will not see as original within the context of your story, but because it will be useful to help stimulate the construction of your world. The books can be somewhat long, but they're not hard reading and should be really easy to get. If the ideas really are as similar as you are concerned about (which I doubt), then reading Harry Potter might stimulate new ideas and new directions you can take the plot. Reading in general is the best way to get new ideas.