David McCallum was 16 years old when he and another teenager confessed to killing a Queens man and dumping his body in a Brooklyn park.

When Judge Matthew J. D’Emic dismissed the indictment against the pair in Brooklyn Superior Court on Wednesday—28 years, 11 months and 12 days after his arrest—the 45-year-old fell face forward and wept.

But...