If the *TBI* quit, why would you swap a motor?
I know it's not what you want to hear, but you aren't going to get many people to recommend an injection to carb swap anymore. Injection is better than carburetion in every regard (broad statement, not completely true lol). Many of the components on my injection setup are original 1987-1989 parts. My carbs caused me more problems than the injection ever has.
Realistically it's just a matter of tying a bunch of wires up, modifying a couple (the distributor IIRC) and as mentioned, all the various components that are different on the '87 due to TBi than the '82. But since the body is the same, everything will swap over. You'll also have to consider the transmission, depending on if you plan to go with what is already in the truck or not. The K5 and K20 I'm assuming have different trans.
Whatever you do, don't cut the wiring. One of these days you'll realize that being able to hop into the vehicle, turn the key, and drive away, regardless of weather, is better than the alternative, and is far more pleasurable to drive.