Addressing the optimal operation of modern distribution networks has become a computationally complex problem due to the integration of various distributed energy resources (DERs) and the need to handle numerous network constraints. Although data-driven methodologies show promise in addressing the non-linearity and non-convexity of such optimization problems, they often face challenges in satisfying system constraints. This paper proposes combining imitation learning (IL) with a surrogate optimization model (SOM) to minimize operational costs and active power losses, bypassing the nonlinearity in the original optimization problem while ensuring feasible solutions. The effectiveness of the proposed IL-SOM approach in accurately predicting the variables of the optimization problem is validated using a 25-bus unbalanced three-phase distribution network test case. Furthermore, the predicted variables fully comply with critical system constraints, including active and reactive power balance constraints, phase voltage, and line current magnitude limits.