Firstly, there are good bacterial nematodes and bad parasitic nematodes in soil. It is the parasitic nematodes that you want to get rid of that harm your vegetables. Neem is a wonderful natural solution for this.
So, to answer you briefly, yes neem does work in getting rid of parasitic nematodes while leaving the good bacterial nematodes alone.
While neem will kill chewing and sucking insects, it will leave the good bugs alone such as ladybirds and bees etc.
Neem is a wonderful plant that has so many uses, and although it has been used throughout the ages in India, it is only just being discovered by the Western World, and about time!