For an integrator, the voltage should rise ONLY when the mean voltage is zeero. If a sine vawe is not pure, that means the mean voltage isn't seero, and it will cause the voltage over the cap to vary - as you won't.
You can partly solve the problem by add an resistor in parralell with the cap, but it create a new problem - the cap will discharge over time as you've already discovered, and the circuit then becomes useless for the original purpose.
Need to ask you this question: What are you gonna do with the output from the integrator? If you are feeding the integrator with a sine wave with a frequence that vary, you'll get a frequency out that vary.
I think you cannot use this approach to actually measure distance as I thing you're planning to.
What you need is a square wave to feed your integrator where the duty cycle changes with the speed. Only then I think you actually can use an integrator output as a measure of distance. If the voltage out will be linear compared with distance is to find out.
Actually I think you have an pretty interesting project here
Good luck.