The pension loan needs to be repaid, NOT the loan to the insider.
OP borrowed money from a pension plan and then elected to use that money to pay a family member ergo there is a preference if the bk is filed within 1 year of the payment to the insider. The insider will be attacked by a Trustee. OP could step up to the plate and work a settlement with the Trustee to protect the insider but it is a recoverable preference one way or the other.
Des.
I agree with despritfreya that the source of the money the OP used to make the loan to the insider is not relevant here. He could have used his pension loan for anything, but instead elected to use it to pay off part of the loan he had with the relative. And that's a preferential payment to the relative when made within the year before filing the bankruptcy petition.
And most pension loans technically don't have to be repaid. With the typical pension loan the pension trust is not going to sue to get that money back, after all. Rather, what happens is that if the loan is not repaid in time the pension trust will treat it as a distribution from his/her pension of the amount that was outstanding. So failure to pay would result in taxable income to the OP and perhaps a penalty for early distribution from the pension.