Hey there! Both variations are a G major chord - so the only difference is that they sound slightly different. The notes that make up a G major are G, B, and D. So it's your choice whether you play a B or D note on the 2nd string.
I chose to play it that way for no other reason than I like how it sounded that way. But you can easily play it the other way no problem!
Make sense?
Mike
Keep rockin!
Mike Olekshy
GT Guitar Coach