The problem of charging unmanned aerial vehicles (UAVs) is an important application area for wireless power transmission (WPT). However, the flight characteristics of UAVs make it difficult for the traditional single-coil coupling mechanism to ensure alignment between the transmitting and receiving ends. It also has poor anti-skewing performance and a cumbersome optimization process, which ultimately decreases the efficiency of charging UAVs. To address this problem, this paper takes the 2×2 square coil array as research object, analyzes the distribution characteristics of the axial magnetic field at a specific height, proposes a "cross" compensation structure, and adopts genetic algorithm to optimize the side length and turns of the compensation coil. The goal is to significantly improve the axial magnetic field uniformity in the charging area and reduce the degree of magnetic field leakage. Finally, the effectiveness and superiority of the proposed "crossover" compensation structure and its optimization method are demonstrated through the construction and testing of the system experimental platform, which significantly improves the anti-offset performance and transmission efficiency of the WPT system.