The lattice of wurtzite nitrides such as gallium nitride (GaN) and aluminum nitride (AlN) is distorted by alloying with scandium (Sc). This lattice distortion, which entails a decrease in the lattice constant ratio c/a, leads to a significant improvement in piezoelectricity and the appearance of ferroelectricity, which are attractive properties for material applications. However, systematic studies on the effect of different alloying elements on the lattice distortion of wurtzite nitrides are scarce and restricted to theoretical investigations. Herein, the experimental investigation of the lattice distortion and its influence on the piezoelectricity of cosputtering‐prepared thin films of GaN alloyed with group III and rare‐earth elements other than Sc, that is, yttrium, dysprosium, and ytterbium is described. All the investigated elements greatly reduce the lattice constant ratio of GaN from 1.63 to 1.61 and cause a twofold increase in the piezoelectric charge coefficient. Therefore, it is indicated in the experimental results that alloying with elements other than Sc also results in the distortion of the crystal lattice and the enhancement of the piezoelectric properties of GaN. Furthermore, regardless of the particular alloying element used, a correlation between lattice distortion and piezoelectricity is experimentally demonstrated.