Of course, it is more hairy than that. There is an estimate of the number of people on the original track as well as a probability that the reroute does not save them.
Even if a new treatment for depression were developed due to this research (which it probably won't), and you were clinically depressed, would you want to receive it knowing it was came about after the torture and eventual deaths of 20 baby monkeys? I wouldn't feel comfortable with that.
Personally, I wouldn't have a problem with taking said treatment, but I know that others may have different feelings about that. The ends don't justify the means is a very valid ethical opinion, how relatively extreme it is in this case depends on the size of the possible award vs. the trade-off, which takes professional knowledge to properly estimate.