You'll have to see if the expense is worth it. First try changing the transmission fluid, it's a lot cheaper than a new transmission.
Here is a basic outline of how to do it, original details by alphasenior. If you buy everything used, it'll cost about $2200-2500 parts + labor ($1500-2000). There are a lot of small parts like the axles and starter that look similar but you must switch them to the 5 speed ones. The original thread is here, you have to sort through a lot of chaff, a summary is below:
http://forums.tdiclub.com/showthread.php?t=151516
Parts:
Transmission & mounts
Axels
Flywheel, Pressure Plate, Clutch, Misc.
Dust "tins" from engine assembly (there are two)
Clutch Pedal Assembly
Clutch Pedal Line
clutch, flywheel, and pressure plate, throw out bearing
Here are some common parts that you might not be able to find in the junkyard: Thanks to Rodrigues
Small Clip on Master cylinder - 7M0 721 431
O ring for master cylinder - 02F 141 143 A
350mm Hose to Hydraulic Tank - 857 721 453
Clutch pedal firewall gasket - 1j1 721 410
3 M8 Nuts that hold clutch pedal in N - 902 264 03
Transmission dust cover plate (manual) 02A 301 157 C
Engine dust cover plate (manual) 06a 103 645
Axle Bolts x12 (ask the dealer)
Transmission bolts there's four of them, two different sizes (ask the dealer)
Shifter Box
Shifter Linkage
All Bolts and nuts, clips, brackets, etc...
All interior peices that touch the stick shift
Starter (looks identical... but is not)
Remove the auto transmission. Install the shifter bracket and clutch pedal. There's already a mounting area and bracket hole or the clutch pedal, it's a direct bolt on. Install the manual transmission but you have to make a small edit in the wiring harness and then use a vag-com to recode the ecu to tell it that you have a manual transmission.