You didn't tell much about a distance measurement specification, particularly object properties and intended accuracy.
You should ask, if a simple IR distance "measurement", which is just a measurement of reflected light intensity is suitable for your purpose. It can work, if the object is large and has a clearly defined reflection coefficient. Otherwise, it can't tell more than presence or absence of an object, which I won't qualify as distance measurement.