This paper presents an intelligent feedforward controller based on the feedback linearization approach to control nonlinear systems. In particular, the nonlinear autoregressive moving average (NARMA-L2) network is trained to reproduce the forward dynamics of the controlled system. Consequently, the trained NARMA-L2 network can be immediately integrated into the inverse feedforward control (IFC) structure. In order to improve the NARMA-L2 structure's ability to approximate nonlinear systems, the NARMA-L2 controller is comprised of two wavelet neural networks (WNNs). In addition, the RASP1 function was used as the mother wavelet function in the structure of the WNN rather than the more common Mexican Hat, Gaussian, and Morlet functions. To prevent the limitations of gradient descent (GD) methods, an artificial gorilla troops optimization (GTO) algorithm is used to determine the optimal settings for the NARMA-L2 inverse controller parameters. In particular, a modified version of the GTO algorithm, which is called the Modified GTO (MGTO) algorithm, is proposed in this work for training the NARMA-L2 inverse controller. This algorithm has demonstrated superior optimization outcomes in comparison to other methods. The effectiveness of the proposed control strategy is demonstrated using two nonlinear dynamical systems. Specifically, several evaluation tests are used to assess the effectiveness of the WNN-based NARMA-L2 in terms of control accuracy and robustness against external disturbances in each of the systems under consideration. These tests clearly demonstrated the effectiveness of the control system. Finally, a comparison study showed that the proposed WNN-based NARMA-L2 controller achieved better control results compared to the multilayer perceptron (MLP) and the radial basis function (RBF)-based NARMA-L2 controllers.