OK...NOW I think I have it! I see now that the distance shader has to be placed as the input to the density fractal. And pure white is the mask, not pure black. I had it reversed. I do that all the time with mask colors regardless of the program...get them swapped in my head.
Here is a further modification based on your file, Dune. What I did was use 2 distance shaders, one to mask the foreground area, and one to mask the background area, resulting in just a "notch" area showing through between them. But I had to turn off the black color for the distance shader in question. THIS is what I was ultimately after...control of clouds within any desired range.
The only confusing part now is why let the far and near colors be anything but black or white? The only conclusion I can come to is that it gives you complete control over what frequencies you are masking, but I am not convinced of that.