The neutral of the generator on a typical metal airliner is connected to the airframe as is the neutral lead of the battery.
The airframe is used as the earth return for both dc and ac systems. The aircraft only needs to be grounded when it's on the ground to avoid static build up.
In flight static build up is discharged through a series of static wicks on the trailing edges of the flying controls , boat fairings, fin/stab tips etc...
On the ground the tyres allow static discharge but during refuelling and maintenance operations a seperate earth is attached.