Indoor localization of wireless nodes is a relevant task for wireless sensor networks with mobile nodes using mobile robots. Despite the fact that outdoor localization is successfully performed by Global Positioning System (GPS) technology, indoor environments face several challenges due to multipath signal propagation, reflections from walls and objects, along with noise and interference. This results in the need for the development of new localization techniques. In this paper, Long-Range Wide-Area Network (LoRaWAN) technology is employed to address localization problems. A novel approach is proposed, based on the preliminary division of the room into sectors using a Received Signal Strength Indicator (RSSI) fingerprinting technique combined with machine learning (ML). Among various ML methods, the Gated Recurrent Unit (GRU) model reached the most accurate results, achieving localization accuracies of 94.54%, 91.02%, and 85.12% across three scenarios with a division into 256 sectors. Analysis of the cumulative error distribution function revealed the average localization error of 0.384 m, while the mean absolute error reached 0.246 m. These results demonstrate that the proposed sectorization method effectively mitigates the effects of noise and nonlinear signal propagation, ensuring precise localization of mobile nodes indoors.