heat dissipation from a 20000 V 1 A filament which is on for 1 second
You are making this too complicated. You have everything you need right there. Power is voltage times current. The power into the filament will therefore be (20 kV)(1 A) = 20 kW. That running for one second means the total energy into the filament is (20 kW)(1 s) = 20 kJ.
Yes, it really is that easy.
So to find resistance I took 1A/20000V=0.00005Ω
No. You have Ohm's law backwards. That should be (20 kV)/(1 A) = 20 kΩ.
All that said, a filament is a really bad example for this. The resistance of the filament material, like all materials, is a function of temperature. Since the filament temperature changes significantly when you apply power, so does its resistance. Incandescent bulb filaments can change up to 10x in resistance from cold to hot.
Since the warmup time of such a filament is significant relative to 1 s, so is its much lower resistance during part of that time. With constant current applied, the filament receives less power initially when its resistance is low. It does warm up a bit, which raises its resistance, which cause it to receive more power, which warms it up more, etc. If you started above some critical current, then the filament will eventually light properly.
Conversely, with constant voltage applied, the filament will heat faster initially, then the received power stabilize as the filaments gets hotter. Incandescent bulbs therefore are best driven with a constant voltage, not a constant current. In that mode, they somewhat self-stabilize. At high powers and sometimes for longer filament life, there are soft-start circuits which limit the current initially. This reduces the internal mechanical stresses due to sudden uneven heating. Once near operating temperature, constant voltage is used during normal operation.