This study is focused on benthic invertebrate communities in the Djerekarska River in Serbia, sampled from June to December 2016. We examined how different microhabitats with various substrates influenced the structure and function of the community. Taxonomic analysis revealed 55 species from 43 genera and 35 families, with the most diverse groups being Trichoptera, Ephemeroptera, and Plecoptera. ANOVA showed that different substrate types impacted the functional feeding groups within the assemblages. Cluster formation was primarily influenced by the substrate structure; this was followed by shredders, gatherers and collectors, passive filters, active filter feeders, the river depth, biochemical oxygen demand, chemical oxygen demand, and the flow velocity; for grazers and scrapers, discharge and saturation did not significantly affect cluster formation. Using two-step cluster analysis, we identified three clusters based on the substrate structure. The first group consisted of organisms that prefer a stone substrate; the second group consisted of organisms that prefer a mixed stone/gravel/sand substrate; the third group consisted of organisms that prefer gravel and sand substrates. Each cluster had a dominant functional feeding group, such as shredders and predators in the first cluster, gatherers and collectors in the second cluster, and predators, grazers, and scrapers in the third cluster.