Is "has died for several years" correct?
I know it is correct to say
He has been dead for three years.
I've learned the present perfect tense, and it's said that non-continuous verbs are allowed. Is this sentence correct as well?
He has died for three years.
Die is an Inchoative verb; that means it refers to a change of state.
The Present Perfect construction can be used with a Stative predicate like be dead or own a house the way you suggest. This is called the Universal sense of the Perfect.
But die is not stative; it's inchoative, and therefore punctual -- it refers only to the instant when the change took place. So, in principle, it could use the Existential sense of the Perfect, which is restricted to punctual, or at least completable, events.
He has died for three years.
which suggests that he has died several times over a time span of three years. However, dying is something that can only be done once, and therefore a sentence like this is apt to raise an eyebrow, at least.
Hint: in situations like this, remember that Stative - Inchoative - Causative predicates come in triples, and there's usually one with the right characteristics available for use in a different construction. In this case, the triple is kill - die - dead (you need a be to carry the tense with dead, but it's a stative predicate, like most but not all adjectives).
That's why He's been dead for three years is what suggests itself to a native speaker.
It would work for describing an unsuccessful stand-up comic.
"He has died for three years at the Edinburgh festival "