We have measured the transverse field muon spin precession in the flux-lattice (FL) state of the two-gap superconductor MgB2 and of the electron doped compounds Mg(1-x)AlxB2 in magnetic fields up to 2.8 T. We show the effect of the two gaps on the internal field distribution in the FL, from which we determine two coherence length parameters and the doping dependence of the London penetration depth. This is an independent determination of the complex vortex structure already suggested by the STM observation of large vortices in a MgB2 single crystal. Our data agree quantitatively with STM and we thus validate a new phenomenological model for the internal fields.