That sounds like a pretty basic problem but it isn't, quite. For motion near the surface of the earth, we could take the acceleration due to gravity to be constant, -g. But if you are talking about "escape velocity" you must be considering the object moving to great distance compared to the radius of the earth. Then [itex]F= -GmM/r^2[/itex] where G is the "universal gravitational constant", m is the mass of the object, M is the mass of the earth, and r is the distance from the center of the earth, so that the acceleration is [itex]-GM/r^2[/itex].
That gives [itex]a= dv/dt= -GM/r^2[/itex]. Since the variables on the left are "v" and "t" while we have "r" on the right (and v= dr/dt), we can use a technique called "quadrature". Since a= dv/dt= (dv/dr)(dr/dt) (by the "chain rule") [itex]a= (dv/dr)(dr/dt)= (dv/dr)v= -GM/r^2[/itex]. We can write that as [itex]v dv= (-GM/r^2)dr[/itex].
Integrating [itex](1/2)v^2= GM/r+ C[/itex] (That, by the way, is "conservation of energy"- the left is kinetic energy, the right is the negative of the potential energy, and there difference is constant). Then we have [itex]v^2= 2GM/r+ C[/itex] so that [itex]v= dr/dt= \sqrt{2GM/r+ C}[/itex].
Now, we need to integrate [itex]\frac{dr}{\sqrt{2GM/r+ C}}= dt[/itex].
The left side is an "elliptic integral" (from the fact that it is related to calculating the orbits of planets and satellites which are ellipses), well known NOT to be integrable in terms of elementary functions but well tabulated.