Grandad was correct in his method.

An alternative approach that would not require integrating the acceleration term would be to use the physical grounds that as the particle starts at rest it's final KE must be equal to the PE it gains in the 'fall'. Hence you would arrive at the same equation as grandad with

$\displaystyle \frac{1}{2} m v^2 = - \int_{d}^{x} \frac{k}{{x'}^2} \, \mathrm{d} x'$

i.e.

$\displaystyle \frac{1}{2} m v^2 =k \left(\frac{1}{x} - \frac{1}{d} \right)$

where $\displaystyle v$ is the velocity at $\displaystyle x$ and $\displaystyle x'$ is simply a dummy variable in place of $\displaystyle x$ so we can use the limits to take care of the constant of integration.

So rearranging the above equation we have that

$\displaystyle \sqrt{ \frac{x}{d-x} } \frac{dx}{dt} = \sqrt{ \frac{2k}{md} } $

thus integrating wrt the dummy variable $\displaystyle t'$ in place of $\displaystyle t$ using the limits $\displaystyle x'=d$ at $\displaystyle t'=0$ and $\displaystyle x'=0$ at $\displaystyle t' = t$ we have that

$\displaystyle \int_{d}^{0} \sqrt{ \frac{x'}{d-x'} } \, \mathrm{d}x' = \int_{0}^{t} \sqrt{ \frac{2k}{md} } \, \mathrm{d} t' = \sqrt{ \frac{2k}{md} } t$.

Now to deal with the integral wrt $\displaystyle x'$ let $\displaystyle x' = d \sin^2 \theta$ so

$\displaystyle \mathrm{d} x' = 2 d \sin \theta \cos \theta \, \mathrm{d} \theta$

hence

$\displaystyle \sqrt{ \frac{2k}{md} } t = d \int_{-\frac{\pi}{2}}^{0} 2 \sin^2 \theta \, \mathrm{d} \theta$

$\displaystyle \iff \sqrt{ \frac{2k}{md} } t = d \int_{-\frac{\pi}{2}}^{0} \left(1- \cos 2 \theta \right) \, \mathrm{d} \theta = \frac{\pi}{2} d$.

Finally this gives us that

$\displaystyle \color[rgb]{0,0,1} \boxed{t = \frac{\pi d}{2} \sqrt{\frac{md}{2k}}} $ .

I'll leave it to you to check in case I made any algebraic errors!