It is the same music. John and Michelle Phillips originally wrote the song for McGuire and sang backing vocals on his version. Afterwards they decided to take the song back, so they recorded their own lead vocals over the original backing track from McGuire's version. I do like McGuire's version, I think his raw voice works well for the song.
I haven't heard McGuire's version in years, THE MAMAS AND THE PAPAS version would become the version that everyone is familiar with. I may be wrong but McGuire's version, with the single vocal, doesn't really give the California vibe that is needed. THE MAMAS AND THE PAPAS version, with the complete harmonies, gives the California vibe and sound which would become THE MAMAS AND THE PAPAS trademark sound.