I recommend you tell your niece that people go to another place when they die. I found my granddad dead on the stairs when I was 5 and it was harsh knowing that he was gone forever but the idea that he went to heaven made it easier to accept. If I were you I'd tell your niece this: "life is like a computer game, nobody dies, only their characters die like a computer game, your granny will be waiting for you once your finished playing the game". Thats pretty much my philosophy on life anyway and with this in mind death doesn't bother me the slightest bit.
As for explaining the cancer itself I'd just tell her that hes done playing the game and her characters dying. If you were to find out thats actually how it is, would you be bothered by the idea of someone dying? Remember little kids assign authority to adults, so she'll believe what you tell her. You can be happy knowing that you've gave her a positive, self strengthening belief that may even make her immune to the mental viruses nuns and teachers will attempt to fill her head with later down the line. I can't imagine the amount of suffering I would have avoided if someone had gave me this philosophy when I was a kid.