Query expansion terms are often used to enhance original query formulations in document retrieval. Such terms are usually selected from the entire documents or from windows or passages surrounding query term occurrences. Arguably, the semantic relatedness between terms weakens with the increase in the distance separating them. In this paper we report a study that was conducted to systematically evaluate different distance functions for selecting query expansion terms. We propose a distance factor that can be effectively combined with the statistical term association measure of Mutual Information for selecting query expansion terms. Evaluation on TREC collection shows that the distance-weighted Mutual Information is more effective than Mutual Information alone in selecting terms for query expansion.