A 21-year-old man was killed by a shot to the back at a Brooklyn park on Thursday night and two others were injured in the shooting, officials said.