How do I use the distance shader to populate trees at a certain distance?
Just plug it in as the Density Shader input, and set distances as-needed. You can temporarily plug the Distance Shader into your surface shader network to better visualize the area of coverage, too. The attached example will give you rocks at a distance but not closer-up; you can reverse the colors if you want to mask out objects further in the distance instead.
- Oshyan
...and don't forget to assign a camera to the distance shader. You can either use the render camera or any other one you can place wherever needed.
Or you can place the population at the desired distance, unless you want a soft transition from the background to the foreground.