There is a distinction between living forever on earth and eternal life.
Although we are not given overt and explicity details about this, it appears that the tree of life enabled Adam and Eve to live forever on earth. Prior to the Fall, this was great. After the Fall, however, this would have caused mankind to remain in an unredeemed body that is incapable of fully realizing the relationship with God for which we were created. Thus, physical immortality in an unredeemed state is really an entrapment apart from the glory God desires for us to experience.
Jesus specifically defines eternal life in John 17 as the ability to know God. This is what John was also referring to in John 20:30-31 as well as the verse you mentioned--1 John 5:13. Eternal life is being in a relationship with God through Jesus Christ the Son. This, again, is to be distinguished from physical immortality.
And this is eternal life, that they know you the only true God, and
Jesus Christ whom you have sent. John 17:3 ESV
Now Jesus did many other signs in the presence of the disciples, which
are not written in this book; 31 but these are written so that you may
believe that Jesus is the Christ, the Son of God, and that by
believing you may have life in his name. John 20:30-31
If one lived forever in a physical body that is under the curse and not be able to separate from that into a glorified body, then our relationship with God would be ultimately limited. For, as the Scripture says, when we see God face to face, then it is when we will know Him fully, as we are fully known by Him.
For now we see in a mirror dimly, but then face to face. Now I know in
part; then I shall know fully, even as I have been fully known. 1
Corinthians 13:12 ESV
So, immortal physical life is distinct from eternal life. The former would inhibit our relationship with God, while the latter gives us a relationship with God.