However, due to being less sensitive you need dynamic mics close. The only thing you can do is get the mic closer to what you want to record, or switch to a less sensitive microphone type such as a dynamic rather than condenser.
You can't just select a distance and have a mic magically reject everything else.