It's less about dying and more about them becoming separate (development of self as an individual) and the entirely sensible terror of being alone.
Is it as straightforward as that?
I don't think you can always second guess the root cause of a persons fear and anxiety.
There could be lots of reason the person; even if that person is a child; is afraid and has anxiety about dying.
If it were me, I'd find out what exactly it was they are afraid of. Loneliness, being eaten by lots of wriggly things while buried underground, pain or maybe something you wouldn't associate with death yourself?
Then try to explain and help them to understand the reality of death. Also explain that if we never died, life wouldn't be worth living. On one hand, we wouldn't feel pain and sadness, but on the other hand, you would never feel happiness and enjoyment. Perhaps emphasise the enjoyment part with a little treat.
Also explain the low probability of them dying. How many people do they know? Get them to add them all up. Now work out their combined age and multiply it by 365. How many of those people have died in their sleep? The numbers will be bamboozling for a child who can only count up to so high. Now tell them to imagine having that many white ping pong balls in a box and there bing one black ping pong ball. Get the to visualise how big that container of balls would be. The black ping pong ball represents them dying in their sleep. I think that even a child could figure out that if they have a box of thousands of white ping pong balls and only one black one, they'd almost certainly pull out a white one.
That was pretty much my own thought process when I was that child who was afraid of dying.