That`s right, and if you are still desperate, you can plunder some planets, but DON`T DO THAT until you`re totally desperate AND have worked out how to get the maximum benefit from it. Often if you`re that bad into debt, it`s better to restart.
So the thing to remember for the future is, don`t do your research with ships standing around... it`s usually OK to disband them then build them over again than pay for them for 100+ turns.
But disbaning your fleet and selling minerals should take care of it. You might have to crash the market (sell at much lower prices), which won`t make you rich, but they`ll sell, and you`ll at least be solvent again.