This paper presents a novel time-of-arrival estimation method for ultra-wideband (UWB) ranging systems that utilizes a double sliding window variance detection algorithm to improve the accuracy of detecting the first path under challenging conditions like non-line-of-sight. The proposed method shows significant improvements over traditional energy detection-based techniques, particularly in indoor scenarios, by effectively capturing variance changes in the received signal. Simulations using standard channel models demonstrate the enhanced performance of the proposed approach compared to conventional methods.