The answer depends on (1) getting the biblical understanding of what the tree of life represented. It is also important to recognise that, (2) because God knew before creating anything material that one of his spirit sons would try to wrest sovereignty over the Earth from its creator, he declared in Eden how to counteract this; so, to partake of life was to hear, believe, and obey his revealed will.
(1) No fruit from any tree on earth can give anyone eternal life. Likewise, there is no fruit from any tree on earth that can give knowledge of any kind to anyone. Whatever Genesis means regarding the two Genesis trees, they are symbolic in application. After the Genesis opening accounts, the only one of those trees that is ever mentioned again in the Bible is the Tree of Life, which is no longer on earth, but in heaven. It is mentioned in conjunction with the river of the water of life - see Revelation 21:1-5. But the Tree of the Knowledge of Good and Evil is no more mentioned after the end of Genesis chapter 4.
Here is an extract from a book that deals with this point - the first point of importance being to know what this 'knowledge of good and evil' is that warned of by God, in the opening chapters of Genesis.
"The tree of the knowledge of good and evil is not food. 'Thou dost not eat of it' says the literal Hebrew [Young] Gen. 2:17. Thou dost not eat of that because it is not edible! 'In the very day that thou eatest thereof, thou shalt die' because you can't digest it!
...Life needs to be initiated, increased and sustained by the Tree of
Life. And that Tree is in the very midst of the garden. "Of the trees
of the garden thou mayest freely eat". These very words are the Tree
of Life. The Word. The Word which was from the beginning. Eat that
word. First. Eat it and imbibe it and understand that thou art to eat
to live. Thou are to eat of that which is freely given - to live. Turn
away from that, and you die...
For God is a Spirit. And can only be approached and worshipped in
Spirit. He cannot be approached by that which is natural and of
creation. It is not possible. To attempt it, is to die. But word is
required. Yet not the word that is mere knowledge. Not the various
trees that came out of the ground, in the garden though they be. And
not, absolutely not, that word of mere knowledge that pertains to good
and evil. Which presupposes the presence of life capable of performing
that which is required.
The first utterance of the word of God shows how utterly essential it
is for us to understand this primary concept. And this is what
repentance is about, above all. Having another mind about this very
matter. Else, we cannot progress to anything else. Hear. Eat. Live."
Knowledge and Life, Nigel Johnstone, pp 17-19 (Belmont Publications 2013) http://www.belmontpublications.co.uk
That quote is designed to show that until we grasp what the Tree of Life is, we will never understand what the Tree of the Knowledge of Good and Evil is. Everyone gets waylaid with thoughts of apples and fig-leaves. But it is not about literal objects made out of matter. Discover the meaning of the Tree of Life first, and then it can be partaken of, as described in the last book of the Bible, Revelation, when God has brought to pass the new creation, and the new humanity.
(2) Now, the command of God in Eden that shows how he imparted knowledge as to what the tree of life really was, and that to partake of it was to hear, believe, and obey his revealed will. More from the same book:
"Having made the man and having made all necessary provision for the
man, God 'commanded' him. The word here is tsavah, not the word used
in connection with the ten commandments which are called dabar... I
would say that the word translated 'command' in Genesis 1:16,
tsavah, is a matter of what is right. A matter of rightness. It is not a matter of what to do, in order to live. It is about how to
live. It is not a rule about what to do about living. It is the
way in which to live. The right way to live.
And, firstly, Genesis 2:16, God tells Adam, Of every tree of the
garden eating thou dost eat. Young's Literal. Every tree. Which
includes the Tree of Life. Eating, thou dost eat. Then, secondly,
Genesis 2:17, and of the tree of the knowledge of good and evil, thou
dost not eat of it, for in the day of thine eating of it, dying thou
dost die. Young's Literal again.
These are the first words of God to man. Here, in the beginning, he
spoke. Which means that he revealed himself. He revealed himself in
word. In speech. In utterance. This is how he reveals himself. In the
beginning was the Word.
And this is how to live. Eat of that which is of God - and eating thou
shalt eat. It is a Tree of Life. ...But thou dost not eat of the other
tree. This is not, really, a command. It is a statement of fact.
Thou dost not eat of that. It is not food!
This is not, as some men try to make out, the giving of some kind of
law to Adam...
Instructing Adam to eat what is proper, God, by his very word, reveals
the Tree of Life. God is stating to Adam what is necessary for his
life. And God is telling Adam what is harmful to that life. And, in so
doing, God has revealed himself, in word. A certain kind of word.
Tsavah. The stone tables, the ten sayings, are another form of word. Dabar.
Tsavah. Begins with Tzaddi. Tsavah is the word of righteousness. Dabar is the law, the word that says, This do and thou shalt live. Tsavah says eat and thou shalt live. Dabar says this do, and thou shalt live.
...As to what is of spirit, God is a spirit, also, eat. Receive,
freely, what is of God. Engage with it; experience it; digest it; be
one with it.... In the beginning was the word. Logos. He, in whom was
Life. He was there, all the time. Revealed. The Word." (Ibid pages
25-28)
Much more could be said, especially about the correct translation of Genesis 3:22, but space does not permit. Already this answer has become very long, but it is necessary to show that Adam was already 'partaking' of the Tree of Life - the Word of Life - for God had given him life and was sustaining his life - up until Adam decided he would turn to another source for life as 'a god'. He then 'partook' of a lie as his chosen source of knowledge. And all it did was reveal to him that he was naked. Yet God knew there was no need for Adam to be clothed, therefore no clothes were provided for him - until he partook of the 'bad fruit' that brings death. It certainly looked good, and desirable, until partaken of. But God already has the Tree of Life in heaven. Will we hear his word about that and be partakers of that, for life everlasting?