Having fought high level flying and mobile creatures with a melee character in the group I can tell you with absolute confidence that a bow will NOT do the job on a str based character. Not even close. Not even in the same league.
		
		
	 
Cranking some math just for fun: 
Assume a 12th level Paladin of Devotion with Str 18, Dex 12 and Cha 20 and a longbow (+5 to hit). The foe can be an adult red dragon (AC 19). DPR against that AC with bog-standard everything is 
4.3, which may not sound like much but hey! it's better than zero. If he casts Magic Weapon on himself to get a +2 bow that goes up to DPR 5.65. If he also uses Sacred Weapon it goes to 
8.9. If he's willing to also invest in Sharpshooter that goes up to DPR 
13.65--that's kind of a questionable return on investment for a feat, but it is an option, and would allow him to inflict 
40.95 points of damage on the dragon while it is still closing, as well as punish it if it chooses to hold the range open.
Compare to DPR 
42.2 (
59.95 with Sacred Weapon) if he can actually get it into melee range and smite with his three 3rd level spell slots (
7d8+4=36.5 damage per hit).
To provide some context: 
A Warlock with Hex and Cha 20 would be doing 
22.65 DPR, a Sorlock would be doing 
45.3, an Int 20 Evoker with Magic Missile V would be doing 
52.5, a Dex 20 archer would be doing 
19.2, a Sharpshooter archer with Dex 20 would be doing 
24.08, a Sharpshooter with Dex 18 would be doing 
20.1, an action surging Dex 20 Sharpshooter would be doing 
48.15, and a Cha 20 Scorching Ray Gold Dragon Sorc would be doing 
41.7 if not for the pesky way red dragons are immune to fire.
So the bog-standard Paladin with a longbow is pretty much futile, but by investing in Sharpshooter he can do damage about half that of a specialized archer in spite of his Dex 12. Whether that's more attractive than just sticking purely to melee will be a campaign-dependent decision that has a lot to do with how much you enjoy being a generalist.