More information, please
Welcome to the forum and thanks for asking our advice.
Depending on the layout of your home and its surroundings, a handgun may not be the best choice. Shotguns have already been mentioned.
If you are not willing to practice, get training. If you are not prepared for the legal and moral aftermath of a shooting, prepare. Review your insurance policies, too.
I don't know how much training you got in the Navy (I got some when I was in the Air Force, especially during my time in combat engineers), but home defense is sufficiently dissimilar that a renewal course is in order.
However, most of the same principles apply. Deterrence. Early detection and alert. Defense in depth. Have a comprehensive defense plan, including calling for backup (911) and (if applicable) escape and evade.
But, to your question.
A gun in the nightstand is next to useless if you are not practiced with it. Any gun is worthwhile if you know what you are doing.
.357 has been mentioned. Muzzle flash may blind you and the report will deafen you, especially in a confined space unless you put on hearing protection when you go to investigate that bump in the night. 38 Special is nearly as effective and somewhat quieter and more manageable. My opinion, 45 ACP is better in a close-range fight.
I mentioned my preference for shotgun. It is much easier to aim, less likely to send a deadly bullet outside your walls (to injure innocents outside). If your defense plan involves a stationary defense, it is hard to do better in most home layouts.
If you choose a handgun, stay away from the compact models. They are much harder to hit with. Full-size, hand-filling is best, but too long a barrel might be a disadvantage if you get into a hand-to-hand grappling session. So, if your defense plan involves clearing your home yourself, 4" to 6" barrel may be optimal.
Revolver or semi-automatic? Revolvers are simpler to operate. Autoloaders have higher capacity for ammunition. Choose caliber and action type first, then make a list of the guns that qualify Choose from that list.
My usual advice is to get a really decent 22 rimfire with target sights (Ruger semi-auto, Mark I or Mark II used or Mark III used or new or Browning Buckmark are good examples of semi-autos) Ruger Single-Six for a single action revolver or Smith & Wesson K-frame 22 or Taurus Model 94 revolver and spend time at a shooting range. There, you will get to see a variety of arms and if you demonstrate good gun handling skills, are likely to be offered the chance to try a few out. (Most gun owners are proud of their hardware and love to show it off to anyone they think might appreciate it.) In a lot of places, you can rent guns at the range, but in my neck of the woods, there are no ranges that rent.