Physical layer security is a promising technology for non-terrestrial wireless networks due to the lack of infrastructure over the low-altitude and high-altitude uncrewed aerial vehicle platforms. Physical layer security can be addressed using key-based and keyless approaches, such as channel adaptation and channel coding. In the key-based approach, the legitimate users generate secret keys by exploiting the unique random channel gains, which can be further used for information encryption and decryption. In non-terrestrial networks, the physical layer exploitation and the matching of generated secret keys on legitimate ends become more complex due to the 3-dimensional channel models, and the high mobility of uncrewed aerial vehicles, resulting in nonzero key. To address this challenge, this paper proposes an artificial intelligence-based key exchange mechanism where the secret keys are generated on the legitimate nodes of the communications links. The transmitter is responsible for training the neural network and transmitting the final synapses to the receiver to reconcile the information. The results are presented in terms of secret key waveforms. The success rate against the number of errors that occur in a single 128-bit key and 256-bit key shows a significant improvement.