If you have a lot of muscle before doing jiu-jitsu, then, unfortunately, it will not build muscle but can help maintain some of it. On the flip side, if you have no muscle or very little before jiu-jitsu, then yes, jiu-jitsu will help you build a significant amount of muscle. You should add some weight training between jiu-jitsu.
If you start a grappling martial art with little to no strength, then doing one of these martial arts can help you build a significant amount of strength. If you are already a strong person, then a grappling martial art can help you maintain that strength. Grappling is most effective at building core strength.