Forecasting of long-term annual electricity demand is studied utilizing historical data for electrical energy consumption and socio-economic indicators-gross domestic product, population, import and export values for the case of Turkey between 1975 and 2020. A quadratic model for electrical energy consumption was applied to define the relation between the historical and predicted data. This model used metaheuristic algorithms; genetic algorithms (GA), differential evolution (DE), particle swarm optimization (PSO), artificial intelligence (AI) approaches; neural networks (NN), and adaptive network fuzzy inference systems (ANFIS), and machine learning (ML) applications; all models undergo testing, but the top four models-stepwise linear regression (SLR), NN, Gaussian process regression (GPR) with exponential, and GPR with squared exponential-are selected for additional research to determine the best forecasting model based on their forecasting performance. Comparing the finalized models SLR produced the best forecasting model with a mean absolute percentage error (MAPE) value of 2.36%, followed by GA with 2.97%. Turkey's yearly electrical energy consumption is projected under three possible scenarios through 2030. Finding the most appropriate forecasting model among the models studied for long-term electrical energy forecasting is ultimately the primary goal of this research. Simulations are done on the MATLAB (TM) platform.