He didn't say they would die immediately. He simply stated that they would die. Up to that point in their existence there was no death.
He says " in the day that you eat of it thou shalt surely die"
what people arent realizing is that mankind was never created under the sentance of death, we were in Gods image and Likeness and Gods word tells us they had access to the tree of life. when they sinned, after God curses them, he expells them from the garden, and then He blocks the path to the tree of life. that is the moment when mankind, becomes mortal now adam and eve are both under the curse of sin and death. adam lives over 900 years...and then He dies.
when God said to Him " you must not eat of this fruit for in the day that you eat of it you will surely die"
God was really saying alot more than that, that is one sentance of restriction, a safety restriction none the less. its like if i worked for you in a plant and had to work around a deadly chemical, your going to warn me for my safety to watch out for it its dangerous. God was really saying to them all things are yours, i give you dominion and lordship over all of my creation over all the earth, i give you every tree and seed bearing plant and herb and animal, have dominion and rule over the earth. then He says " you are free to eat of any tree in the Garden, but.....this particular tree, its deadly dont eat from it.
Gods word to them there is Love its a warning of the only thing that will cause thier death. man was created to be like God right, holy, good, pure to rule the earth within the will of God according to His ways because they are very good ways and will lead to a very good creation they are Life to mankind as a whole. satans deception also changes thier wiew of God, questions Gods intent toward them. " did god really say you must not eat from any tree?"......surely you will not die! for God knows that when you eat of it it will make you as gods knowing good and evil" ....
he creates a perception there that God lied to them, he is just keeping the fruit to himself, its a good thing, he just doesnt want them to have it. eves response is to now" see that the fruit is good for food, pleasant to the eye, and desireable for gaining wisdom" then her actions follow her thoughts and she takes the fruit and eats it. He turns them against what God said as He gets them to disobey it, because He knows they will surely die if he can get them to eat the fruit. satan Knows Gods word will happen as spoken and He uses it against them. Killed them with Gods warning meant to Keep thier Life.....
romans 7: "
For I was alive without the law once: but when the commandment came, sin revived, and I died.10And the commandment, which was ordained to life, I found to be unto death. 11For sin, taking occasion by the commandment, deceived me, and by it slew me. 12Wherefore the law is holy, and the commandment holy, and just, and good.