The Basics of Judaism: Sin and Repentance: Adam's Life Span:
Adam was told (Gen. 2:17) that on the day he ate from the tree,
he would die; but he lived for over 900 years afterwards.
Why didn't he die on the same day?
The problem raised by Gen.2:17 has been answered in several ways:
1) It means that if you eat from the tree you will be under sentence
of death (Targum Yonasan), but nothing was said about how soon the
sentence would be carried out.
2) It means that if you eat from the tree you will become mortal.
(This answer seems questionable; Adam never ate from the Tree of Life,
so he was mortal all along. See Gen.3:22.)
3) A "day" means 1000 years (see Psalms 90:4), and Adam did in fact
die before he reached the age of 1000 (Gen.5:5).
Ask a follow-up question