How to build distance measuring device that can only detect red light from a common red laser
Physical method  

A quick method would be to just use a filtering lens. You will need to buy a lens specifically made to pass light at the wavelength of the laser. 
Common wavelength for cheap laser diodes is typically 650nm.



Simply filtering by red light may still lead to a noisy signal though, depending on the environment.

Software Method  

Another way to filter out other sources of light would be to have the laser send a specific signal. That way, the receiver can ignore everything else. Software based filtering must also be processed at fast enough speeds, which can be quite fast for short distances.

The signal could be encoded in a way to reduce false-positives. One example would be to simply send a defined number of quick pulses at defined intervals. All other received signals can be rejected.

The duration of the signal should be short enough so as not to collide with returning reflections.
It is important to consider Maximum Unambiguous Range. This plays a role in determining the usable values for a signal's frequency and duration. 



The signal can only travel so far between transmission periods. The shorter the period, the shorter the possible 'certain' distance measurement. So both the desired update interval of the measurement, as well as the expected maximum distance, also play a role in what the encoded laser signal can be. Longer update periods can reduce error.

Combining the physical filter with a software filter can dramatically reduce false positives, even with other distance measuring lasers in the area.