To get longbow proficiency in DnD 5e, you need to multiclass into a Barbarian, Fighter, Paladin, or Ranger, or pick up the Weapon Master feat. Multiclassing into each of these classes gets you proficiency with all martial weapons, including longbows.
Other than that, a Path of the Kensei Monk can make the longbow into a Kensei Weapon, giving them proficiency with it. This does require three levels in Monk, however.
The Weapon Master feat grants proficiency in four weapons of your choice (simple or martial). So you can also get longbow proficiency via this feat.