Depends on the particular 4WD system. On mine it does; I have electrically-locking axles.
Even when not in 4WD, the front axles spin; they just aren't connected to the transfer case. This causes parasitic drivetrain loss.
If you have an older 4WD system with manually locking hubs, I.E. you have to get out and twist both hubs on the front wheels to be in 4WD, then the loss is so small it's negligible.
Also as has been mentioned, a 4wd equipped vehicle will weigh more than a 2wd vehicle.
4wd>everything else, IMO.