The present study addresses the issue of varying fault locations within a distribution system, which leads to fluctuations in short-circuit currents and requires the implementation of adaptive protection strategies for network reliability. This paper presents a novel adaptive protection scheme that specifically considers these fault location variations using directional overcurrent relays (DOCRs). Unlike previous research on adaptive protection, which does not adequately account for fault location variations, this method employs deep neural networks (DNNs) for online fault location detection. In the verification process, the effectiveness of the proposed methodologies was assessed by analyzing the time derivative of a trained machine learning model for fault identification. This approach enables the immediate detection of fault locations within the distribution system and facilitates the transmission of the setting group index to activate preset optimal coordination parameter values for the system relays. Crucially, the proposed method ensures that the coordination constraints remain intact across various adaptive settings, relying on precise fault identification through machine learning. The practical significance of this approach lies in its applicability to real-world systems because the proposed solutions and protective settings can be easily implemented using commercially available relays. To evaluate its effectiveness, the adaptive protection scheme was tested on three distribution networks: IEEE 14-Bus, 15-Bus and 30-Bus. The comparative test results highlight that the proposed method significantly improves the speed of the protection system for distribution networks when compared to existing studies, making it a valuable contribution to enhancing network reliability and performance.