Fault slip distribution is usually retrieved from geodetic data assuming that the local crust is an elastic, homogeneous and isotropic half-space. In the last decades spatially dense geodetic data (e.g., DInSAR maps) have highlighted complex patterns of coseismic deformation that require new modeling tools, such as numerical methods, able to represent rheological and geometrical complexities of the Earth's crust. In this work, we develop a procedure to perform inversion of geodetic data based on the finite element method, accounting for a more realistic description of the local crust. The method is applied to the 2009 L'Aquila earthquake (Mw 6.3), using DInSAR images of the coseismic displacement. Results highlight the non-negligible influence of the medium structure: homogeneous and heterogeneous models show discrepancies up to 20% in the fault slip distribution values. Furthermore, in the heterogeneous models a new area of slip appears above the hypocenter. We also perform a resolution study, showing that the information about fault slip distributions retrieved from geodetic data should be considered as averaged on surrounding patches.