Fourier proof was incomplete. Fourier used the following
Statement. A real entire function has only real zeros if
its derivatives have the following property:
If $x$ is a real root of $f^{(n)}$ then $f^{(n-1)}(x)f^{(n+1)}(x)<0.$
But he verified this only for polynomials. Fourier's proof was criticized by Cauchy, and Fourier defended his arguments, but the statement above is not correct for unrestricted entire functions. The full story is described in the paper of
Pólya, Some problems connected with Fourier's work on transcendental functions, Quart. J. Math. 1 (1930) 21-34.
In this paper he stated what is called since then the “Fourier–Pólya Conjecture”: If $f$ is a real entire function of genus $0$, then the number of points where $f^{(n)}(x)=0$ but
$f^{(n-1)}(x)f^{(n+1)}(x)>0$ is equal to the number of pairs of non-real conjugate zeros.
This conjecture was proved only in 2000:
H. Ki and Y. Kim, On the number of non-real zeros of real entire functions
and the Fourier–Pólya conjecture, Duke Math. J. 104 (2000) 45–73.
(The earlier paper of Kim
Kim, Young-One,
Critical points of real entire functions whose zeros are distributed in an infinite strip,
J. Math. Anal. Appl. 204 (1996), no. 2, 472–481.
already contained what is needed to justify Fourier's argument).
Thus Fourier's method has been justified, after 170+ years of research, but it is incomparably more complicated than the "modern" proof based on the observation that zeros of Bessel's function are eigenvalues of a self-adjoint operator, and these eigenvalues are real by a two-line linear algebra argument. If I remember correctly, this observation is due to Poisson.
See also my lectures with an exposition of other related conjectures of Pólya: https://www.math.purdue.edu/~eremenko/dvi/kent.pdf