We amplified a widely used barcode, the V9 region of the SSU rRNA gene, to study the effect of environment on the distribution of two heterotrophic protistan lineages in marine plankton, kinetoplastids and diplonemids. To close sampling gaps, we collected 57 new samples targeting especially the mesopelagic zone dominated by heterotrophs. We sampled in three geographic regions: the Arctic, two depth transects in the Adriatic Sea, and the anoxic Cariaco Basin. We show that the distribution of both groups is not random and follows several environmental gradients. In agreement with previous studies, both groups are most abundant and diverse in the mesopelagic zone and their communities are structured according to depth. We studied summary statistics (relative abundance and richness) and, on the other hand, community structure. We found that abundance and diversity of both groups decreases at high oxygen concentration and high salinity. We show that community structure depends most strongly on depth and temperature or latitude.