Here's what I'm getting.
Idealised assumptions, object at rest relative to sun, sun is a point mass, Newtownian gravity, no other sources of gravitation, mass of object is negligible compared to sun.

is the initial distance (with no velocity),

is the time at which object is at this initial distance,

is gravitational constant,

is mass of sun.
Formula then gives the time

at which a given distance from centre of sun,

, is achieved. Formula valid for

.
This tells you how long to reach any given distance from the centre of the sun. Strictly speaking, it stops being valid once you hit the surface, because it assumes the sun is a point mass.
If we choose

(how long to get to the centre of the sun), it simplifies to
But, I get something just a bit over the 2.8 million years already posted.