Interesting problem. Can you tell us the symptoms of the u-joint going bad? Was it just getting noisy or were there other issues? Was there any other installation problems that you ran into? Did you install the spring in the correct orientation? I think your spring has a very slight taper and the large diameter faces the pinion gear nut if it is similar to my ZN shaft drive.
Swapping out the bevel gears is a very tricky job and one that I have never had to do. I hope you have a service manual to help with shimming for proper bearing preload and adjustment of proper gear clearances and proper tooth contact.
For reference, here is the exploded view of the drive train.
Buy OEM Parts for Kawasaki Motorcycle 2005 Drive Shaft / Final Gear Diagram
www.partzilla.com