A least-squares-based adaptive algorithm with forgetting factor is proposed for localization of a target by a mobile distance measurement sensor. This problem, in its most general form, was tackled in a recent paper using a gradient adaptive algorithm, assuming distance measurements are directly available. We establish that the proposed algorithm bears the same stability and convergence properties as the gradient algorithm previously studied. It is demonstrated via simulations that the proposed algorithm converges significantly faster to the location estimates than the gradient algorithm for high forgetting factor values and significantly reduces the noise effects for small values of the forgetting factor. Furthermore, a more challenging form of the original problem is considered, where distance information is required to be deduced from time of flight measurements, considering a time of flight-based active distance measurement sensor and an environment with unknown signal permittivity/speed; the proposed algorithm is redesigned to solve this problem.