While it is difficult to determine exactly what McCandless learned from his time in Alaska because he died before being able to talk to others about his time there, he did leave behind notes which demonstrate some of what he was thinking about when he passed away.
One note was posted to hikers and was an SOS. McCandless writes that he is out picking berries but begs anyone who reads his note to help him "in the name of God." This note indicates that McCandless perhaps learned the lesson of the newcomer in Jack London's "To Build a Fire"--don't try to survive on your own in the wilds of Alaska. The fact that such an independent free spirit like McCandless would beg for others to help him demonstrates that he had perhaps realized that his solitary trip into the wild was more dangerous than he had anticipated and that sometimes humans have to depend upon one another.
Similarly, the note that McCandless holds in his hand in his last self-photo indicates that perhaps he had somewhat forgiven his parents for not being what he wanted them to be. He wrote, "I have had a happy life . . . May God bless all!" While he does not direct the note to his parents, it seems as if he includes them in the "all" portion and also in letting others know that he has lived a happy life--something that almost all parents what for their children.
Finally, McCandless died knowing that the wild had gotten the best of him. He uses the word "Goodbye" in his last note, indicating his awareness of his impending death, but it seems as if he is at peace with "giving in" to the wild. Perhaps his final lesson was that if one simply pursues his goals, the failure to reach them doesn't necessarily matter in the end.