A gene therapy for progressive vision loss developed by Biogen Inc. has failed in late-stage clinical trials, the Cambridge biotech said Friday.