If your dog is whining or barking in an elevator. You need to desensitize him to it. This doesn’t mean use the elevator more and more however. When you are entering into the elevator ( you know the dog is going to be uncomfortable) so bring treats with you and set your dog up for success. When you enter the elevator before the dog whines reinforce with a treat. Then ask for the basics sit or down and reinforce them if they do it. By the time the doors open your dog will have been reinforced several times in the elevator. Do this every time you go into the elevator!!! No skipping. If you can monitor your dogs progress and maintain this training, your dog will start running into the elevator because it is so reinforcing!
Like always small simple steps and obedience is the key. If they are focusing on you other distractions,no matter how uncomfortable, will slowly diminish.