From the ideal gas state equation, applied to hydrogen, the molar volume is:
$$V_\mathrm{m} = \frac{RT}{p}$$
Using the Avogadro constant $N_\mathrm{A}$ as number of molecules in $\pu{1 mol}$, we get the volume, statistically containing in average $\text{1 molecule}$ of $\ce{H2}$:
$$V=\frac{RT}{pN_\mathrm{A}}$$
The reciprocal value $\frac{pN_\mathrm{A}}{RT}$, used below, is the molecular density in $\pu{m-3}$.
The cube root then gives the length of the edge of the respective cube:
$$L=\sqrt[3] {\frac{RT}{pN_\mathrm{A}}}$$
that gives the mean distance of centers in the tightest case of 2 facing cubes.
For $R=\pu{300 K}$ and $p = \pu{e5 Pa}$, $\sqrt[3]{\frac{RT}{pN_\mathrm{A} }} \approx \pu{3.46 nm}$
For the most distant case of 2 cubes touching by the corner, it is
$$L=\sqrt{3} \cdot \sqrt[3] {\frac{RT}{pN_\mathrm{A}}} \approx 1.73 \cdot \sqrt[3] {\frac{RT}{pN_\mathrm{A}}}$$
So the true mean will lay between these two extreme values.
More exact value would be integration over randomly placed molecules.
Another approach is to use the molecular density to calculate radius where are 2 molecules.
$$2 = \frac{pN_\mathrm{A}}{RT} \cdot \frac 43 \pi r^3 $$
$$6RT = pN_\mathrm{A} \cdot 4 \pi r^3 $$
$$ r = \sqrt[3]{\frac{3RT}{2 \pi pN_\mathrm{A} }}= \sqrt[3]{\frac{3}{2 \pi}} \sqrt[3]{\frac{RT}{pN_\mathrm{A} }} \approx 0.782 \cdot \sqrt[3]{\frac{RT}{pN_\mathrm{A} }}$$
and then
$$ D \approx 1.564 \cdot \sqrt[3]{\frac{RT}{pN_\mathrm{A} }}$$
This is the maximal value, the more proper one would be to compute the mean distance of two molecules randomly place in a sphere of a given diameter. But this step is already beyond my skills.
But, by stochastic Monte Carlo analysis, it looks like the mean distance of two randomly placed objects in a sphere of radius $r$ is $$L_\mathrm{mean} = \frac{4}{3}r = \frac{4}{3} \sqrt[3]{\frac{3}{2 \pi}} \sqrt[3]{\frac{RT}{pN_\mathrm{A} }}= \sqrt[3]{\frac{32}{9 \pi}} \sqrt[3]{\frac{RT}{pN_\mathrm{A} }} \approx 1.042 \cdot \sqrt[3]{\frac{RT}{pN_\mathrm{A} }} = 1.042 \cdot \pu{3.46 nm} \approx \pu{3.61 nm}$$