To set an AI characters melee and range weapons go to its character blueprint, like for example the BP_RangeSoldier.
Then select the BP_AIComponent in the Components panel and in the Details panel search for Starting Weapon like the image below.
Here you can set the Start Range Weapon and Start Melee Weapon settings.
You can also set the Start Holdable, this is the weapon the AI will hold when first spawned/begin play if Combat Equip Weapon is set to False.
Remember to set Can Melee Attack or Can Range Attack to True if you set an AI to use a weapon. These settings are found in the weapons holdable blueprint in the Class Defaults, just search for Can Attack like the image below.