These are very different lenses which generally are used for very different needs.
The 18-105 zoom is a lens that is supposed to be a sort of do everything lens. It ranges from a wide angle to a short telephoto. The problem with do everything lenses is they don't do anything really, really well. On the wide angle side, these lenses have more distortion than a wide angle lens. Also these lenses are slower (higher minimum F stop) than dedicated "prime" or fixed focal length lenses. Now, don't get me wrong, one can get good results from these lenses especially if you stop them down to about F 8.
The Nikon 105 micro is a whole different story. It is designed to focus an image on your sensor that is 1 to 1. That means the image on the sensor is life size. The 18-105 can only do an image that is 1.5 times the life size on the sensor. Also, the optics on the 105 micro is superior to the 18-105 zoom. Another advantage of the 105 is that it is a reasonably fast lens with a 2.8 minimum apeture and it gives good results wide open. Also the 105 micro is optically an excellent lens. It far exceeds the 18-105 zoom in this regard.
As they say on the cable TV commercials, WAIT! THE IS MORE! In shooting underwater, you need to use a port. The Nikon 105 can be used with a reasonably compact port with a flat surface. No the 18-105 has a minimum focus distance of 18". It requires a filter with diopters and a great big dome for shooting underwater. I don't know of anyone who uses this lens underwater. Most people use the 60 mm micro, the 105 micro, or a very wide angle zoom. The only zoom that I know that is considered very useful is the Sigma Macro 17-70 and even that requires an 8" dome.
Now if you are just running around on the surface taking photos, the situation is very different. The Nikon 105 micro is a specialized lens that mainly makes sense when you are taking photos of flowers, insects and other small objects. It can be pressed into service as a short telephoto. The 18-105 zoom can be a very good all around lens for surface applications if you don't want the fuss and bother of lugging around a pile of lenses and you want to take photos in a variety of circumstances.
Both lenses have their place. The 105 micro does what it does very well. But it is a pretty specialized lens. It does not make sense having one unless you want to take serious close up photos. The 18-105 zoom is a very versatile lens that can give good results in a wide variety of applications. If you require very high optical performance, you are not going to get it. But hey, it is versatile and inexpensive. For many photographers, it is as much lens as they really ever need.