The two lenses you're looking at are two different types of lenses.
The 18-105 is a walkaround zoom, and can also be considered a superzoom (i.e., a lens with an extraordinarily large zoom range, that goes from wide angle to telephoto). It's made to be very convenient in terms of framing/zooming capability, but will have compromises in optical performance to cover the very large zoom range, and is liable to be "slow" (i.e., have a small maximum aperture). These types of lenses are typically good for travel, street shooting, and general walkaround usage in daylight, but may be less useful in low light situations, and may be limited in the type of background blur you can achieve with them. But it can be an all-in-one solution to covering wide-to-telephoto without needing two or three lenses.
The 55-300 is a telephoto zoom. This is the type of lens most people grab to get "more reach", or to get closer to faraway subjects. You can shoot the moon with it, although a supertelephoto (something longer than 300mm) would probably give higher image quality for those types of shots. Telephoto zooms are most commonly used for subjects like sports or wildlife, but can also be used for portrait shooting. However, lower-cost telephoto zooms, are typically going to be slower lenses with smaller maximum apertures. You would most typically use this together with an 18-55 kit lens to cover all the focal lengths from wide to telephoto.
The type of lens a lot of people consider a portrait lens for a beginner would be what's called a fast prime. A prime lens is one with a fixed focal length--it has no zoom capability whatsoever. It will typically have a much simpler optical design, but it will also be smaller, lighter, and probably cheaper than a zoom counterpart. And can have a large maximum aperture for less cost than an f/2.8 zoom would. Typical examples of this type of lens for a Nikon DX shooter would include the 35/1.8, 50/1.8, and 85/1.8 lenses. While some more experienced shooters can use or prefer to shoot only primes, these lenses are more often, for a beginner, supplements to their more versatile (but slower) zoom lenses.