Federated learning (FL) is considered a promising machine learning technique that has attracted increasing attention in recent years. Instead of centralizing data in one location for training a global model, FL allows the model training to occur on user devices, such as smartphones, IoT devices, or local servers, thereby respecting data privacy and security. However, implementing FL in wireless communication faces a significant challenge due to the inherent unpredictability and constant fluctuations in channel characteristics. A key challenge in implementing FL over wireless communication lies in optimizing energy efficiency. This holds significant importance, especially considering user devices with restricted power resources. On the other hand, unmanned aerial vehicle (UAV) technologies present a cost-effective solution owing to flexibility and mobility compared to terrestrial base stations. Consequently, the deployment of UAV communication in FL is viewed as a potential approach to deal with the energy efficiency challenge. In this paper, we address the problem of minimizing the total energy consumption of all user equipment (UE) during the training phase of FL over a UAV communication network. Our proposed system facilitates UE to operate concurrently at the same time and frequency, thereby improving bandwidth utilization efficiently. In this paper, we address the problem of minimizing the total energy consumption during the training phase of FL over a UAV communication network. To deal with the proposed nonconvex problem, we propose a novel alternating optimization approach by dividing the problem into two suboptimal problems. We then develop iterative algorithms based on the inner approximation method, yielding at least one locally optimal solution. The numerical results demonstrate the superiority of the proposed algorithm in solving the proposed problem compared to other benchmark algorithms, particularly in determining the optimal trajectory of the UAVs. In addition, we conduct extensive experiments to evaluate how different parameter settings affect performance after implementing the proposed optimization approaches for deploying FL within the UAV communication system. These analyses yield valuable insights into the comparative effectiveness of the proposed optimization algorithms concerning overall energy consumption reduction.