So really, there are two forbidden trees in the beginning:
Genesis 2:17 ESV
"But of the tree of the knowledge of good and evil you shall not eat, for in the day that you eat of it you shall surely die.”
Genesis 3:17
And to Adam he said, “Because you have listened to the voice of your wife and have eaten of the tree of which I commanded you, ‘You shall not eat of it,’ cursed is the ground because of you; in pain you shall eat of it all the days of your life"
And after the first forbidden tree was eaten of:
Genesis 3:24 ESV
"He drove out the man, and at the east of the garden of Eden he placed the cherubim and a flaming sword that turned every way to guard the way to the tree of life."
But there is a way to eat of one of the forbidden trees:
Revelation 22:14 ESV
"Blessed are those who wash their robes, so that they may have the right to the tree of life and that they may enter the city by the gates."