Tail light problem

I'm almost certain that it's corroded connections. I'd take a wire brush to the taillight connections and clean them thoroughly. That's the only thing that would explain why the other lights are working, but not the tail light itself. Either that or you purchased the wrong type of bulb.
 
I had a '99 GMC Yukon with a similar problem. There wasn't an issue of rust and I spent some time trying to figure it out. It stayed as an intermittent problem until I ordered a replacement light assembly. Never had another issue.