Energy consumption is a critical concern within the electric vehicle (EV) industry. Despite its substantial impact, drivetrain losses have been inadequately addressed in some studies. This paper introduces drivetrain losses as a nonlinear function of velocity, incorporating them into the comprehensive energy consumption model. Considering the influence of traffic congestion on vehicle speed, our proposed model integrates drivetrain losses, aerodynamic losses, tire losses, kinetic energy losses, and potential energy losses. The objective is to optimize routing with the aim of minimizing energy consumption. To tackle this problem, we present a dedicated adaptive large neighborhood search algorithm. Our numerical experiments reveal key findings: (1) Drivetrain losses represent a higher percentage of total energy consumption compared to aerodynamic and tire losses; (2) Drivetrain losses influenced by traffic congestion constitute a significant share, ranging between 63.82% and 72.08% of total energy consumption; (3) Energy consumption experiences notable increases under the impact of traffic congestion.