A federal judge has dismissed a lawsuit against the City of New Bedford, ruling last month that two Asian elephants at Buttonwood Park Zoo received appropriate veterinary care, city officials said.