I need to buy a lens to make portraits with my Nikon d7000.
I know that for every camera model lenses behave differently, so how do these lenses perform with the d7000?
Can I save money and buy the 1.4d instead of the 1.4g?
Considering all G are D, buy the cheapest one you find considering :
Yes, both lenses can be used with the D7000 in a normal portrait situation.
According to Nikon the D means that the lens sends distance information to the camera body. This can then be used to track moving objects and adjust the focus accordingly. For a normal portrait situation this would not be a vital functionality. This is useful for moving objects, like children running around.
G means that the lens does not a have a manual ring for the aperture. With the D7000 you do not need a aperture ring on the lens as you can select the aperture using the camera body.
Either lens will work just fine on the D7000. The differences come into play with old film cameras (F4 and older, IIRC) which need an aperture ring (you can't use G lenses fully) and entry-level DSLRs that don't have a built-in focus motor.
The G is an AF-S lens, while the non-G lens is not. An AF-S lens has a built-in focus motor, which means that it can auto-focus with cameras that do not have an in-body focus motor. Since the D7000 has an in-body focus motor, it can auto-focus with either lens.
The other advantage of AF-S lenses is that you can override auto-focus and tweak where the camera is focusing by simply grabbing the focus ring and turning it. The camera senses that you turned the ring and stops trying to focus automatically. With the non-G lens, you'll have to actually flip a switch to turn off auto-focus.
The G lens does not have an aperture ring, but that doesn't really make a difference on the D7000 as you can still use every function exactly the same with the non-G lens. You can lock the aperture ring on f/16 and let the camera control it.