Reproducing the UVJ Color Distribution of Star-forming Galaxies at 0.5 < z < 2.5 with a Geometric Model of Dust Attenuation