Per 14 CFR 43.3(d):
A person working under the supervision of a holder of a mechanic
or repairman certificate may perform the maintenance, preventive
maintenance, and alterations that his supervisor is authorized to
perform, if the supervisor personally observes the work being done to
the extent necessary to ensure that it is being done properly and if
the supervisor is readily available, in person, for consultation.
However, this paragraph does not authorize the performance of any
inspection required by Part 91 or Part 125 of this chapter or any
inspection performed after a major repair or alteration.
This means if you are not a mechanic yourself, you can still perform this work as long as it is supervised by someone who is authorized to perform the work. Based on your question, I assume that you actually want to perform this work yourself. Further down in 14 CFR 43.3(g), the FARs state the type of work you can perform without supervision:
Except for holders of a sport pilot certificate, the holder of a pilot
certificate issued under part 61 may perform preventive maintenance on
any aircraft owned or operated by that pilot which is not used under
part 121, 129, or 135 of this chapter. The holder of a sport pilot
certificate may perform preventive maintenance on an aircraft owned or
operated by that pilot and issued a special airworthiness certificate
in the light-sport category.
Preventive maintenance is defined in Appendix A to 14 CFR 43, paragraph C. If a function does not appear in this list, it is not preventive maintenance, and as such must be performed by personnel authorized to perform repair work. The only item in this list that is even remotely relevant to your situation is item 31:
Removing and replacing self-contained, front instrument panel-mounted
navigation and communication devices that employ tray-mounted
connectors that connect the unit when the unit is installed into the
instrument panel, (excluding automatic flight control systems,
transponders, and microwave frequency distance measuring equipment
(DME)). The approved unit must be designed to be readily and
repeatedly removed and replaced, and pertinent instructions must be
provided. Prior to the unit's intended use, and operational check must
be performed in accordance with the applicable sections of part 91 of
Note that your situation does not appear to qualify, because the item you are replacing is not part of a self-contained, tray-mounted device. Even if it were, you would still not be authorized to perform the work because this item specifically excludes work on transponders.
Of course, I am not an attorney nor do I perform aircraft repairs, so my interpretation is completely non-qualified. For the best answer, I would suggest contacting your local Flight Standards District Office for guidance.