Three-Dimensional Model of Cosmic-Ray Lepton Propagation Reproduces Data from the Alpha Magnetic Spectrometer on the International Space Station