A good way to become more confident playing in all keys is to take a phrase and play it in every key in order of sharps and flats around the key cycle as shown in the following example which moves around the cycle anticlockwise (adding a new flat for each new key and then continuing through the sharp keys).
It is also important to repeat the process going clockwise around the cycle. Write the scale degrees under the notes at first if necessary, and sing them to yourself as you play. If you hope to play Jazz, this ability is essential, as the majority of Jazz tunes modulate around the key cycle in this manner. Make this process part of your everyday practice. The eventual aim is to be able to pick up your horn and be able to play any melody in any key instantly.