Here is a quick way to do everything and keep the costs right:
1) Make a Work Order for the item.
2) Strip the WO BOM using WO-K-B, then put the item itself and the part you are addingg onto the Wo BOM (1 each) and the part you are removing on there as a negative (-1 each).
3) If you backflush, process with WO-I (otherwise, issue the parts)
If you do labor as a part, you will be all set. Otherwise you will need to process with zero labor.
The result will be: one of the finished item will be removed from stock at Avg Cost, one part will be returned to stock at avg, one new part will be used and one finished item will then be put into stock at the correct cost based on the subtraction of the wrong part and the addition of the correct one.
HTH
(We wind up doing this from time to time. Why? Because we never learn

)