How can IR frequency modulation be used to detect distance?
Have you read the application note? It explains how you vary the path gain to determine the relative distance to a detected object.

First, they talk about varying the transmitter power while operating the receiver at a constant gain.

Second, they talk about varying the transmitter frequency, taking advantage of the fact that the receiver gain varies with frequency.

Is that enough detail for you?