4. Let $A(0, b)$ be the endpoint of the minor axis of the ellipse $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1(a>b>0)$, $B$ be a point on the ellipse, and $C(0,-1)$ be the projection of point $B$ on the $y$-axis. If $A B=3 \sqrt{2}, A C=$ $B C$, then the focal distance of the ellipse is
4. $4 \sqrt{2}$.

It is known that $AC=BC=3, OC=1, OA=2$, i.e., $b=2$, and point $B( \pm 3,-1)$. Substituting into the ellipse equation yields $a^{2}=12$.
Then $c=\sqrt{a^{2}-b^{2}}=2 \sqrt{2}$.
Thus, the focal distance $2 c=4 \sqrt{2}$.