Answer:
If the work done by a resistive force is W then
W = F d = m a d where a is the acceleration of the object and d the distance traveled during this acceleration,
The object started with potential energy E = m g h
m g h = m a d
d = g h / a where d is the distance traveled