Check out the model in question before you post a reply guys. Not all Kawasaki models are constructed like a KZ900/1000.
This confusing misinformation about the 1974-1977 KZ400 petcocks seems to be an everlasting problem on this forum, that started with Wiredgeorge at one time. Although this has been pointed out several times, no one seems to pay attention .
As pointed out by Biquetoast, you can forget all the advises about Pingel, or other aftermarket petcocks for your model. They will not fit since the 1974-1977 KZ400 petcocks are not like the petcocks used on other models. You can try Bikebandit for a complete stock 1976 KZ400D3 replacemant petcock (the gaskets are no longer available as individual items btw), or you can buy the Honda CB750 petcock mentioned in the link Biquetoast posted. The only difference between the Honda petcock and the 1974-1977 KZ400 petcock is the angle of the outlet tubes. But the CB750 petcock fits, and it will work. You can also buy the gaskets only for the Honda petcock, and they will fit the KZ400 petcock.