How to build a car that stops at a certain distance?
Here's the simplest way that I can think of to stop the vehicle at the finish line. You'll need basic LEGO Technic parts and a good length of lightweight string or thread. 

Create two reels for the string. One should be connected to the wheels and the other may turn freely. Wind all the string onto the reel which can spin freely and attach the other end securely to the reel on the wheels so that it will wind up the string as the vehicle moves.

This mechanism should prevent the axle from turning after the vehicle has traveled the desired distance as long as you measure the string appropriately.

Here's an example:



Here's a similar model built in LDD showing exactly how this is put together:



The reel on the back axle will pull all of the string off of the center axle and then stop when the string runs out. If you wanted to be fancy, you could use some math to calculate how much string you need, or you could just test it to find out.