I read a short story back in the 1980s that told the tale of a homesick space pilot.
"Condition of Employment" by Clifford D. Simak, first published in Galaxy Magazine, April 1960, available at the Internet Archive. You might have read it in the Simak collection All the Traps of Earth.
Well, he was more of a shuttle-jockey, good at what he did but hating it all the same. You see, running the shuttle between Mars and Earth was a long, dirty, boring, and sometimes dangerous job.
But there was no glamor. There was brutal work and everlasting watchfulness and awful sickness, the terrible fear that listened for the stutter in the drive, for the ping against the metal hide, for any one of the thousand things that could happen out in space.
He was on Earth, stinking over-crowded Earth, teeming with strangers that he didn't know, polluted air so thick you could carve it, and the endlessly oppressive grimy overcast sky.
Sort of. Actually, his biggest gripe is that Earth is too green:
And the greenness waited for him, the unrelenting, bilious green of Earth. It was a thing to gag at, to steel oneself against, an indecent and abhorrent color for anyone to look at. The grass was green and all the plants and every single tree. There was no place outdoors and few indoors where one could escape from it, and when one looked at it too long, it seemed to pulse and tremble with a hidden life.
The greenness, and the brightness of the sun, and the sapping heat—these were things of Earth that it was hard to bear. The light one could get away from, and the heat one could somehow ride along with—but the green was always there.
He really wanted to be back on Mars - clear skies, every face a friendly neighbor, with such natural and vibrant warm colors visible in every direction.
He had been a fool, he told himself, for ever going into space. Let him just get back to Mars and no one could ever get him off it. He'd go back to the ranch and stay there as his father had wanted him to do. He'd marry Ellen and settle down, and other fools could fly the death-traps around the Solar System.
[. . .]
Sitting, waiting for the cakes to cook, he caught the dream again—the dream of red hills rolling far into the land, of the cold, dry air soft against the skin, of the splendor of the stars at twilight and the faery yellow of the distant sandstorm. And the low house crouched against the land, with the old gray-haired man sitting stiffly in a chair upon the porch that faced toward the sunset.
And yet .. space travel .. he hated it. They all hated it. He decided that when the credits from his last shuttle contract ran low, he'd pitch in for a new contract and get on home.
One day, he told himself, he'd surely find the ship out there that would take him home—a ship with a captain so desperate for an engineer that he would overlook the entry in the book.
That day came, and he did,
"Here's the man," the agent told the captain. "Name of Anson Cooper. Engineer first class, but his record's not too good."
"Damn the record!" bawled the captain. He said to Cooper: "Do you know Morrisons?"
"I was raised with them," said Cooper. It was not the truth, but he knew he could get by.
and after months of tedious boredom punctuated by space terrors he gazes excitedly out the windows of Mars Space Port as he waits in line for Customs and Quarantine to process him. One quick jab of a needle to inoculate him and he'd be home, with a thick wad of credits on his account. No more shuttle jobs for this pilot. He'll find another trade, one that won't require travel.
The climbed down the ladder and walked across the field to the spaceport buildings. Trucks went whining past them, heading for the ship, to pick up the unloaded cargo.
And now it was all coming back to Cooper, the way he had dreamed it in that shabby room on Earth—the exhilarating taste of the thinner, colder air, the step that was springier because of the lesser gravity, the swift and clean elation of the uncluttered, brave red land beneath a weaker sun.
Inside, the doctor waited for them in his tiny office.
"Sorry, gentlemen," he said, "but you know the regulations."
"I don't like it," said the captain, "but I suppose it does make sense."
They sat down in the chairs and rolled up their sleeves.
"Hang on," the doctor told them. "It gives you quite a jolt."
He wakes up the next day, hung-over, his arm throbbing from the vaccination.
No, the story ends in the doctor's office:
Cooper nodded. "I remember now," he said.
He stood up weakly and stared out the window at the alien, the forbidding land of Mars.
"I never could have made it," he said flatly, "if I'd not been psychoed."
He turned back to the doctor. "Will there ever be a time?"
The doctor nodded. "Some day, certainly. When the ships are better. When the race is more conditioned to space travel."
"But this homesickness business—it gets downright brutal."
"It's the only way," the doctor declared. "We'd not have any spacemen if they weren't always going home."
"That's right," the captain said. "No man, myself included, could face that kind of beating unless it was for something more than money."
Cooper looked out the window at the Martian sandscape and shivered. Of all the God-forsaken places he had ever seen!
He was a fool to be in space, he told himself, with a wife like Doris and two kids back home. He could hardly wait to see them.
And he knew the symptoms. He was getting homesick once again—but this time it was for Earth.