I am not an expert but I think the risks vary a lot depending on individual circumstances.
I imagine the biggest factors influencing the overall outcome would be the health of the boar at the time of the operation, the aftercare he receives, and the experience of the vet doing the operation.
If your boar is healthy, you plan to keep a very close eye on him afterwards and are prepared for problems, and the vet doing the operation is experienced in this particular operation on guinea pigs, then you are doing everything you can to keep the risks as low as possible.