I want to export the lyrs to a gdb while maintaining the same
structure as the TOC, sending each group of layers to a different
I think you probably misunderstood the relationship between a
.mxd map file (or layer file) and datafiles such as .shp and geodatabases. A map/layer file does not store the actual GIS data, and it only stores other things like references and styles of GIS data. Vice versa, in ArcGIS, the GIS data formats like geodatabase cannot store the map/layer file either. There are stored separately.
By analogy, the .mxd/.lyr file is like your HTML file containing links to data such as images on your webpage. You can't store the HTML in an image file or an image file in your HTML file.