Thanks for your question.
God did create the "tree of the knowledge of good and evil". Both this tree and the "Tree of Life" were in the "midst of the garden" - see Genesis 2:9. God commanded our first parents not to eat of the tree of the knowledge of good and evil. This was a simple test of their loyalty and faith in God. The tree of the knowledge of good and evil was necessary for this purpose. It doesn't matter what fruit it was. It could have been an apple as popular mythology would have it. It probably wasn't but it doesn't matter. As soon as God placed a commandment on that tree - DO NOT EAT OF IT! - it BECAME the tree of the knowledge of good and evil. Adam and Eve would have gained the knowledge of the difference between good and evil whether they ate of the tree or, when faced with the temptation, the chose not to eat of it. The actual eating of the fruit was not the most important thing. It was the choice they would make. In their decision was bound up the issues of eternal life or death. As soon as they chose, they would know the difference between good and evil. As it turned out, they made the wrong decision and then they ate of the tree. Access to the tree of life, for the sons and daughters of Adam, including you and me, has always been contingent on our decisions when confronted with a choice between good and evil. Let's not repeat the mistake of our first parents!