Wire a new light where there was previously a ceiling fan with a light wired into a 3 gang switch box
Was everything working correctly before you removed the fan? All you want to do is replace the fan with a light fixture? If you have everything wired the way it was when everything was working and you removed the fan you should now have three wires. One white and I'm guessing from your description two blacks. One of those blacks provided continuous power to the fan so it would always operate whether the switch was on or not. You won't need that wire, put a wire nut on it. You should now have a black and a white left, those will connect to the black and white on the new light fixture. If I misunderstood or if you mixed the wires up then you may want to post a better picture of the ceiling box without the bracket as it's hard to see where the wires come from.