Anomalous Electronic Configuration of Thorium
For first four actinide elements $\ce{Th}$, $\ce{Pa}$, $\ce{U}$ and $\ce{Np}$, the difference in energy between $\mathrm{5f}$ and $\mathrm{6d}$ orbitals is small. Thus in elements electrons may occupy the $\mathrm{5f}$ or $\mathrm{6d}$ levels or sometimes both. 

Later in actinide series the $\mathrm{5f}$ do become appreciable lower in energy, thus from $\ce{Pa}$ onward the $\mathrm{5f}$ shells fill in regular way.