Some list Homer. And to a certain extent that’s so: he wrote voyages to the unknown worlds and to hell and back. And some list the Egyptian Sinbad, Sinhue, who did likewise: in the days before space travel, there were ‘exploration’ stories. But to really get the earliest, I think you’d have to go to Gilgamesh, who journeys to the Scorpion Guards at the limit of the world, and who pursues immortality, has it within his hands, and loses it while he sleeps, as a snake devours the plant that would confer it. All these are imaginative fiction which we might equate with space travel: the protagonists explore off the map places and encounter strange beings and forces.

The Roman writer Lucian (b. 125) envisioned a voyage to the Moon.

According to one researcher, you can probably put Marco Polo (b. 1254) on the pile: she did a thorough search of indexed Chinese records of the time and turns up no such visitor…and the Chinese were obsessive indexers. [Possibly he got TO the Silk Road and simply chronicled travelers’ tales.]

In the mid-1600’s Cyrano de Bergerac (b 1619) had a voyage to the Moon powered by fireworks.

But Jules Verne (b. 1828) was much more the first sf writer: a) he confronted a modern era’s skepticism and worry about machines by romanticizing the Machine b) he, more than de Bergerac, tried to envision how such machines would work. c) he integrated his machines into a ‘changed world,’ ie, showed what effect such things might have and d) he was pretty much an optimist about the effect of science, in terms of people not only coping but creating. In 20000 Leagues, eg, Nemo might have been a disillusioned, bitter nutjob, but he was also creating a sort of utopia for his crew and seeking in the ocean a protected zone without the problems of the world as he saw them.

Following him was HG Wells—and to an extent Conan Doyle and H Rider Haggard, who both wrote ‘Lost World’ stories. You could begin, in their era, to add others, like Edgar Rice Burroughs, born in 1875, and dying in 1950.