I am attending an advanced QFT course, and trying to verify the instructor's claim that the retarded Green's function
$$ G_{\text{ret}}^{(4D)}(t,\mathbf{x}) = \theta(t) \left[ \frac{1}{2\pi}\delta(\tau^2) - \theta(\tau^2) \frac{m}{4\pi\tau} J_1(m\tau) \right] \\ (\tau^2 = -t^2+\mathbf{x}^2, \text{ mostly positive signature}) $$
associated to the contour choice
of the theory
$$ \mathcal{L}^{(4D)} = -\frac{1}{2} \partial^{\mu}\phi \partial_{\mu}\phi - \frac{1}{2}m^2\phi^2 + J\phi, \quad \mathcal{Z}^{(4D)}[J]=\int D\phi e^{i\int d^{4}x \mathcal{L}}, $$
implies the Yukawa potential of a static point source at $\mathbf{x'}=0$:
$$ \phi(\mathbf{x}) = \frac{1}{4\pi|\mathbf{x}|} e^{-m|\mathbf{x}|}. $$
My reasoning is that the following should hold:
$$ \int_{-\infty}^{\infty} dt G_{\text{ret}}^{(4D)}(t, \mathbf{x}) = \phi(\mathbf{x}).$$
However, checking this with Mathematica, I observe that they do not match ($f$ is the integral of Green's function multiplied by $4\pi|\mathbf{x}|$, $g=\operatorname{exp}(-m|\mathbf{x}|), k=m|\mathbf{x}|$):
What am I supposed to do to correctly deduce the Yukawa potential, from the 4D Klein-Gordon theory?

