Either get a new zip fitted or take the zip head off anothr zip that is exactly the same make and size of head and open up the bottom end of the faulty zip and slide the new head on. (There is usually a little pip under the zip pull that digs into the teeth and stops it sliding down. This may have worn down or been damaged) Its a fiddly job but can be done. Good luck.
I have had the same problem with a couple pairs of shorts and jeans. I have tried a lot of the suggestions in this post, but the thing I found that worked the best is a product a found online called Zipperade. It works like the thread idea above but much better. I ordered a 3 pack for like $5 USD. Well worth the money.