Update: answer overcome by a splat book
With the release of the Spelljammer setting book, Spelljammer: Adventures in Space, there is now a spell that does this per @SomethingEvil's answer.
If you don't have access to that book, however, the previously accepted answer is as follows:
A magic item permits breathing in such an environment:
Necklace of Adaptation (SRD 5.1, p. 231)
Wondrous item, uncommon (requires attunement)
While wearing this necklace, you can breathe normally in any environment, and you have advantage on saving throws made against harmful gases and vapors (such as cloudkill and stinking cloud effects, inhaled poisons, and the
breath weapons of some dragons).
You can rule that "any environment" includes an airless void.
A problem with this approach is that you'd need to equip each PC with
such a necklace.
- If magic items are fairly common in your campaign, it's less of a
problem than if you are running a very low magic world.
This item could be re-skinned as a Ring of Adaptation using your DM's
Re-skinning a current spell/item (Water Breathing)
Duration: 24 hours
This spell grants up to ten willing creatures you can see within range the ability to breathe underwater until the spell ends. Affected creatures also retain their normal mode of respiration. (SRD 5.1, p. 191)
You can re-skin Water Breathing (Druid/Sorcerer/Wizard 3rd level) to fit this situation. The spell is within your party's power level. It allows a character (via magic) to breath in an environment that normally does not contain air/oxygen. (We won't get into dissolved oxygen in water, this isn't a physics class). It's not too far of a reach to repurpose this spell for the environment you present to the characters (torches don't work underwater either). Changing this spell slightly could require some successful Knowledge and/or Arcana checks, research, or other downtime activity. (In the case of the Druid, you can implement this via prayer/ritual with whatever power/deity the druid serves).
Alternatively, have available for trade, or have the party find as a set up to this adventure
- scrolls with this adapted version of the water breathing spell
- a wand with X charges of this adapted version of this spell.
A wand of fireballs (3rd level spell) is rare, this wand would
be rare as well.
You indicate that this is an extended adventure. The wand might be the best fit if you treat it like the wand of fireballs and have it contain limited charges and recharge at dawn each day. Absent the wand, one of the casters with the spell burns a third level spell each day to keep the party alive for the adventure. (Keep that spell caster alive or TPK is imminent!)
The wand may be the simplest way to do this: it precludes research/downtime.
Another item can fit into this idea: re-skinning a ring's effect slightly can yield a Ring of Water Breathing.
If you want to borrow an idea/item from 1e AD&D, the Iridescent Ioun stone in that edition "sustains a person without air" (DMG 1e p 147). Ioun stones are in this edition, but I did not find that particular one in the book.