Signals of opportunity (SOPs) are a promising technique that can be used for relative positioning in areas where global navigation satellite system (GNSS) information is unreliable or unavailable. This technique processes features of the various signals transmitted over a broad wireless spectrum to enable a receiver to position itself in space. This work examines the frequency selection problem in order to achieve fast and accurate positioning using only the received signal strength (RSS) of the surrounding signals. Starting with a prior belief, the problem of searching for a frequency band that best matches a predicted location trajectory is investigated. To maximize the accuracy of the position estimate, a ranking-and-selection problem is mathematically formulated. A knowledge-gradient (KG) algorithm from optimal learning theory is proposed that uses correlations in the Bayesian prior beliefs of the frequency band values to dramatically reduce the algorithm's processing time. The technique is experimentally tested for a practical scenario of an unmanned aerial vehicle (UAV) moving around a GPS-denied environment, with obtained results demonstrating its validity and practical applicability.