Association with physical structure or conspecifics can impact individual growth and survival. The necessity and strength of these associations changes with environmental conditions and ontogeny, acting in concert or opposition to influence an individual's behavior and ultimate success. We conducted a field experiment on the San Joaquin River, California, with juvenile Chinook salmon (Oncorhynchus tshawytscha) to test hypotheses related to the impacts of physical structure proximity and environmental and ontogenetic change on aggregating behavior of a migratory fish. We created orthogonal combinations of structural cover, turbidity, and juvenile Chinook salmon size and density by manipulating the location of artificial structure within net pens at three sites along the lower river and recorded observations of juvenile salmon swimming in aggregations with underwater video cameras. We selected the most parsimonious generalized linear mixed effects model via Akaike Information Criteria to analyze the effects of structure proximity, turbidity, and salmon size and density on aggregating behavior. The proportion of our observations composed of fish in aggregation increased significantly when fish were >3.5 m from structure; the strength of this effect declined significantly as turbidity, fish length, or fish density increased. We observed a significant decline in aggregation behavior when turbidity increased from 0.5 to 8.5 NTU and fish were more than 3.5 m from physical structure. Turbidity had minimal impact on behavior of fish within 1 m of structure. The proportion of our observations composed of fish in aggregation increased significantly when mean fish fork length increased from 45 mm to 80 mm, or fish density increased from ~0.2 n/m2 to 3.5 n/m2. Collectively, these results highlight how changes in the physical environment (i.e., structure and turbidity) and ontogeny interactively affect the frequency at which juvenile salmon swim in aggregation.