There seems to be no specific description of where Luke got the kyber crystal from, other than that he was missing the "right pieces" needed for the construction of a lightsaber and found those parts (possibly including the crystal) amongst Ben's possessions on Tatooine.
It makes sense for Ben to have had a lightsaber spare parts given that he was expecting to be there for a considerable amount of time and, critically, would have wanted Luke to construct his own saber at the end of his training.
And yet he seemed to know exactly what he needed to know. Reaching out with his mind, he found the right pieces—some easily purchased, some much harder to acquire.
After leaving Obi-Wan’s hut, he knew he had at last collected everything he needed. While our other heroes bustled about preparing for the rescue, Luke retreated into the solitude of a desert cave and puzzled over the pieces….In the end it took not just physical tools but also the Force to put it all together and bring the crystal inside to life.
Return of the Jedi: Beware the Power of the Dark Side!
There's also mention in Heir to the Jedi that Luke was able to salvage a working lightsaber that belonged to a former Jedi. This included a kyber crystal and several focusing crystals.
“All right, I understand. Just a moment.” I collected the pieces of
Huulik’s lightsaber and placed them in a small bag. “Come on, Artoo,”
I said. “We have to run and hide again.”
Star Wars: Heir to the Jedi
That being said, the kyber crystal in question was amethyst, not green although we do also now know that crystals can change colour depending on the user.
Within the Legends Canon there is an extensive sequence in Shadows of the Empire describing how Luke, unable to locate a real lightsaber crystal, was forced to use Ben's recipe for synthetic crystals.
His teacher hadn’t left much behind, not for a man who had once been Obi-Wan Kenobi, a Jedi Knight and a general in the Clone Wars. Perhaps
the most valuable thing was the old and intricately carved boawood
trunk and its contents, including an ancient leather-bound book. A
book that contained all manner of wondrous things for a would-be Jedi,
such as plans for building a lightsaber. The thumbprint clasp on the
volume had accepted Luke’s right thumb to unlock it, and once it was
open, he saw the flashpacket rigged inside the cover. Had anybody
tried to force the clasp, the book would have burst into flame.
Somehow, Ben had known Luke would find this book. Somehow, he had prepared it so that only he could open it safely.
According to that book, the best lightsabers used natural jewels, but there weren’t a lot of the kind he needed lying around where he could
find them on Tatooine. He’d managed to collect most of the electronic
and mechanical parts in Mos Eisley-power cells, controls, a
high-energy reflector cup-but he had to make his own focusing jewel.
Ideally, the best lightsabers also had three of those, different
densities and facets, for a fully adjustable blade, but for his first
attempt at building the Jedi weapon, Luke wanted to keep it as simple
as possible. Even so, it was trickier than the book made it out. He
was pretty sure he had the superconductor tuned right, the amplitude
for the length set where it was supposed to be, and the control
circuitry boards correctly installed. He couldn’t be positive until
the jewel was finished, and the book didn’t mention exactly how long
that took. Supposedly the furnace would shut down automatically when
it was done.
If everything went right, he’d be able to cut the jewel, polish and install it, tune the photoharmonics, and then he’d only have to hit
the switch to have a working lightsaber. He had followed the
instructions to the letter; he was pretty good with tools and it ought
to be okay, but there was a small worry that when he switched it on it
might not work. That would be embarrassing. Or worse, it might work in
a way it wasn’t supposed to. That would be worse than embarrassing:
Luke Skywalker, up-and-coming Jedi Knight, a man who had gone
one-on-one with Darth Vader and lived to tell of it, vaporized when
his faulty lightsaber blew up. So far he’d been very careful
constructing the thing, triple-checking each step, and to get this far
had taken almost a month. The book said a Jedi Master in a hurry could
construct a new lightsaber in a couple of days.
Star Wars: Shadows of the Empire