The achievable accuracy of localization based on received signal strength measurements depends on the path loss exponent (PLE), which describes the multipath fading and shadowing characteristics of a channel. An inaccurate estimation of the PLE leads to inaccurate estimation of positions. In this letter, we introduce a new ranging technique, called VariLoc, which uses a multi-range beaconing approach to perform localization and PLE estimation. The main novelty of VariLoc is that it leverages the sensitivity level of a receiver device for sensing the channel and the transmission power, instead of the more commonly used RSSI measurements, which can be very noisy. This letter shows that VariLoc is robust against multipath fading and can estimate the PLE accurately, even in the presence of very deep fading. This letter further introduces a centroid localization algorithm that utilizes VariLoc to obtain estimates for both the PLE and the position of a target node. The performance of the proposed approach is compared with the state-of-the-art localization algorithms and Cramer-Rao bound using simulation and real-world experimentation using Bluetooth beacons.