Welcome to the forum
I agree - it is a myth that it’s hard to bond boars. It’s no harder than bonding two sows and the process is exactly the same.
I am a boar keeper myself.
The key to any bond is character compatibility: they either have it and they will be fine together; or they don’t have compatibility and then they won’t be fine - exactly the same as with females.
You have to first make sure the cage you intend them to live in is big enough.
Two boys together need a cage of 180x60cm. Boars are more territorial and need a lot of room so any smaller than 180x60cm and it won’t be big enough and lack of space can lead to problems.
You also need to make sure you have multiple of everything.
All hides need to have two exits : don’t use any hides with only one door as it can mean one can trap the other inside and then they can cause fights.
We also say not to use food bowls or hay racks - add loose piles of hay on the cage floor so they can get inside the hay piles and forage freely (hay racks restrict their ability properly forage) and scatter their veg and pellets into the loose piles of hay. This is a great source of mental stimulation and entertainment. It also means the dominant piggy cannot food hog as it is scattered everywhere around the cage.
Now to the bonding itself.
You need to put both piggies in separate but side by side cages for a couple of days so they can get to know each other between the bars. If they have already been side by side then you can go ahead straight to bonding them. It’s particularly important that you do bond them promptly if they are babies (or even if one of them is a baby) as babies should be alone and will appreciate the interaction and companionship quickly.
You then pick the day you are going to bond them.
On bonding day, you need to put both piggies into a neutral territory pen (somewhere neither of them
Sees as their space). Don’t add any hides to this neutral space, just put in hay and water.
They need to stay in the bonding pen for several hours but ideally overnight - provided all is going well.
While they are in the bonding pen, you need to ensure the cage they are going to live on together is clean.
If all goes well during the time in the bonding pen, then you can move them to their cage together. You can add hides to the main cage at this point. It will then take a further two weeks for them to fully establish their relationship.
If things don’t go well in the bonding pen and the bonding fails or if there are fights, then it means they are not compatible and won’t be able to live together. You will then need to keep them in separate but side by side cages permanently. You will not be able to attempt to bond them again
This is the guide which explains the bonding process more fully
Bonding and Interaction: Illustrated Bonding Dynamics and Behaviours
These guides explain boars more specifically
A Comprehensive Guide to Guinea Pig Boars
Boars: Teenage, Bullying, Fighting, Fall-outs And What Next?
Dominance Behaviours In Guinea Pigs