Zero mass Kerr metric When mass in Kerr metric is put to zero we have $$ds^{2}=-dt^{2}+\frac{r^{2}+a^{2}\cos^{2}\theta}{r^{2}+a^{2}}dr^{2}+\left(r^{2}+a^{2}\cos^{2}\theta\right)d\theta^{2}+\left(r^{2}+a^{2}\right)\sin^{2}\theta d\phi^{2},$$
where $a$ is a constant. This is a flat metric. What exactly is the coordinate transformation that changes this into the usual Minkowski spacetime metric form $$ds^{2}=-dt^{2}+dx^{2}+dy^{2}+dz^{2}?$$

As mentioned in @Umaxo's comment,
according to Boyer-Lindquist coordinates - Line element:

The coordinate transformation from Boyer–Lindquist coordinates
$r,\theta,\phi$ to Cartesian coordinates $x,y,z$ is given
(for $m\to 0$} by:
$$\begin{align}
  x &= \sqrt{r^2+a^2}\sin\theta\cos\phi \\
  y &= \sqrt{r^2+a^2}\sin\theta\sin\phi \\
  z &= r\cos\theta
  \end{align}$$

Proving that this is the desired transformation
is a straight-forward but very tedious task.
First calculate the differentials of the above:
$$\begin{align}
dx &= \frac{r}{\sqrt{r^2+a^2}}\sin\theta\cos\phi\ dr \\
   &+ \sqrt{r^2+a^2}\cos\theta\cos\phi\ d\theta \\
   &- \sqrt{r^2+a^2}\sin\theta\sin\phi\ d\phi \\
dy &= \frac{r}{\sqrt{r^2+a^2}}\sin\theta\sin\phi\ dr \\
   &+ \sqrt{r^2+a^2}\cos\theta\sin\phi\ d\theta \\
   &+ \sqrt{r^2+a^2}\sin\theta\cos\phi\ d\phi \\
dz &= \cos\theta\ dr 
   - r\sin\theta\ d\theta
\end{align}$$
Then insert these differentials into the Minkowski metric:
$$\begin{align}
ds^2 &= -dt^2+dx^2+dy^2+dz^2 \\
     &\text{... omitting the lengthy algebra here,
    exploiting $\cos^2\alpha+\sin^2\alpha=1$ several times} \\
  &= -dt^2 
   +\frac{r^2+a^2\cos^2\theta}{r^2+a^2}dr^2
   +\left(r^2+a^2\cos^2\theta\right)d\theta^2
   +\left(r^2+a^2\right)\sin^2\theta\ d\phi^2
\end{align}$$
which is the Kerr-metric for zero mass $M$, angular momentum $J$,
and charge $Q$.
