Environmental changes, particularly in agriculture, contribute significantly to biodiversity loss, with habitat fragmentation hindering dispersal and reducing biological diversity. Specific land uses can confine evolutionary groups to certain areas, decreasing local genetic and phylogenetic diversity but potentially increasing them regionally. Utilising genetic information at the population level, along with richness, phylogenetic and composition data at the community level, offers a comprehensive understanding of agriculture's impact on biodiversity. In this study, we compared the effects of conventional and agroforestry banana plantations on butterflies’ dispersal and diversity relative to native forests. Analysing ddRAD genomic data from Heliconius ethilla narcaea at the population level and assessing richness, phylogenetic and species diversity of the Nymphalidae family at the community level, we found that agroforestry plantations exhibited the highest butterfly abundance and preserved the rarest genetic groups from H. ethilla narcaea. While these genetic groups were prevalent in native forest areas, they were absent in conventional plantation areas despite evidence for extensive genetic dispersal. Regarding species composition, both banana plantations shared similar species but differed from the native forest, which contained a distinct and phylogenetically clustered group of species, possibly due to its unique microhabitat conditions and more complex structure. The presence of the rarest genetic groups in the population and the occurrence of distinct biological species emphasise the critical role of native forests within an anthropogenic landscape. Agroforestry demonstrates the potential to sustain biodiversity alongside food production.