The statement is true for probability measures on a complete separable metric
space. I made a slight variation of the Skorokhod representation theorem
in my PhD thesis (way long time ago!) so I am more or less cutting and pasting,
sorry for the errors.
I got the original proof from Ikeda, Watanabe, Stochastic differential
equations and diffusion processes, North Holland Mathematical Library
24, North Holland/Kodansha 1989.
Let $(S,d)$ be a complete separable metric space, and $\mu$ a probability
measure on $S$ (on the Borel $\sigma$-algebra of $S$).
Set $\Omega=[0,1)$, $\mathcal{F}$ the Borel $\sigma$ algebra of $[0,1)$,
and $\mathcal{L}$ the Lebesgue measure on $[0,1)$.
Step 1: construction of suitable families of subsets of $S$.
For each $k\geq0$ let $(B_m^k)_{m\geq1}$ be balls with radius less than
$2^{-(k+1)}$ which cover $S$ and such that
$\mu(\partial B_m^k)=0$. This is possible since $\mu$ is a finite
measure, hence in each point only a countable set of radii gives balls
with ``fat'' boundaries. Set
$$
D_1^{k} = B_1^k, \qquad
D_2^k = B_2^k\setminus B_1^k, \quad
\ldots, \quad
D_n^k = B_n^k\setminus\bigcup_{i=1}^{n-1}B_i^k, \quad
\ldots
$$
and
$$
S_{i_1\ldots i_k}=D_{i_1}^1\cap D_{i_2}^2\cap\ldots\cap D_{i_k}^k.
$$
It can be easily seen that
- if $(i_1,\ldots, i_k)$ and $(i_1',\ldots, i_k')$ are different,
then $S_{i_1\ldots i_k}$ and $S_{i_1'\ldots i_k'}$ are disjoint,
- $\bigcup_i S_i=S$ and $\bigcup_i S_{i_1\ldots i_ki}=S_{i_1\ldots i_k}$,
- the diameter of $S_{i_1\ldots i_k}$ is $\leq 2^{-k}$,
- $\mu(\partial S_{i_1\ldots i_k})=0$.
Order the $k$-tuples $S_{i_1\ldots i_k}$ by lexicographic order.
Step 2: Define a family of sub--intervals $\Delta_{i_1\ldots i_k}$
(of the type $[a,b)$ in $[0,1)$), such that
$$
\mathcal{L}(\Delta_{i_1\ldots i_k})
= \mu(S_{i_1\ldots i_k}),
$$
such that $\Delta_{i_1\ldots i_k}$ is on the left of $\Delta_{i_1'\ldots i_k'}$
if $(i_1,\ldots, i_k)<(i_1',\ldots,i_k')$, and such that
together they cover $[0,1)$.
Step 3: Define the random variable. For each $(i_1,\ldots, i_k)$
such that $S_{i_1\ldots i_k}$ is non-empty, choose a point $x_{i_1\ldots i_k}$
in the interior of $S_{i_1\ldots i_k}$. For each $\omega\in[0,1)$ set
$X_k(\omega)=x_{i_1\ldots i_k}$ if $\omega\in\Delta_{i_1\ldots i_k}$.
The random variable is well defined since, if $\Delta_{i_1\ldots i_k}$
is non-empty, then the interior of $S_{i_1\ldots i_k}$ is non-empty.
Observe that $d(X_k(\omega),X_{k+p}(\omega))\leq\frac1{2^k}$,
hence by the completeness, the limit
$X(\omega)=\lim_k X_k(\omega)$ always exists.
Step 4: $X$ has law $\mu$. Indeed
$$
\mathbb{P}[X_{k+p}\in\bar S_{i_1\ldots i_k}]
= \mathbb{P}[\omega:\omega\in\Delta_{i_1\ldots i_k}]
= \mu(S_{i_1\ldots i_k}),
$$
and, since each open set $A$ in $S$ is a disjoint countable union of sets
$S_{i_1\ldots i_k}$, by Fatou, $\mu(A)\leq\liminf_k\mathbb{P}[X_k\in A]$,
that is $X$ has law $\mu$.