Pure speculation, as there is no exact canon info:
Before RotJ - No
Only two people could have told Luke this "Chosen One" theory correctly: Obi-Wan and Yoda.
Given the reluctance Obi-Wan accepts that Luke knows the identity of his father, it is unlikely that he or Yoda would disclose the rest to Luke. Also, Obi-Wan doubted that Anakin was the Chosen One any longer after his downfall and conversion to the Dark Side in RotS. He possibly thought that the whole "Chosen One" business was a mistake.
Revenge of the Sith Novellization: Chapter 20
Obi-Wan: “You were the chosen one! It was said you would destroy the Sith, not join them. It
was you who would bring balance to the Force, not leave it in darkness. You were my
brother, Anakin,” said Obi-Wan Kenobi. “I loved you, but I could not save you.”
Thus it is unlikely he would tell this story to Luke, neither he had time while he was alive.
It is unlikely that Yoda told Luke the "Chosen One" theory, as it clearly brings more confusion. Luke already had to make a hard decision to confront his father. If he knows that Vader is the one to restore the balance, it becomes too confusing and demotivating, and could lead Luke to a decision not to fight Vader.
Out-of-the-universe: the "Chosen One" theory might not have been invented yet, possibly another ret-con of the prequels.
After RotJ - quite possible
We do not know how and when Luke communicated with the Force Ghosts of Yoda, Obi-Wan, and Anakin. They could possibly tell him of the concept.