Basically, whenever I power on my Wii U, it works for about 20 minutes, and it automatically shuts down. My console also gets really hot after it power downs and the fan doesn't seem to work.

Well it sounds like you've basically figured out what the issue is. The Wii U's CPU/GPU are both passively cooled on a single heatsink and if it doesn't get any airflow it's gonna overheat. You either need to replace the fan yourself, send it to an electronics shop to get the fan replaced, or send it in for repairsBasically, whenever I power on my Wii U, it works for about 20 minutes, and it automatically shuts down. My console also gets really hot after it power downs and the fan doesn't seem to work.
Can you give me a link to where I can buy a new fan.Well it sounds like you've basically figured out what the issue is. The Wii U's CPU/GPU are both passively cooled on a single heatsink and if it doesn't get any airflow it's gonna overheat. You either need to replace the fan yourself, send it to an electronics shop to get the fan replaced, or send it in for repairs

I can do one better:Can you give me a link to where I can buy a new fan.