The two designations bear no relation to one another other than they appear on Nikon lenses.
G: this designates a lens that has only electronic meter coupling and f/stop control. These lenses lack a conventional f/stop ring and all mechanical meter coupling. They can only be used on those modern bodies that do not rely on mechanical meter coupling and provide their own method of controlling the f/stop.
AF-D: There is no "D" designation without the "AF-". AF-D lenses provide basic AF functions plus additional distance data. Also, AF-D lenses only autofocus on bodies that have their own AF motor since these lenses lack a built-in motor.