The factory service manual shows #1 to be on the rear driver's side 1 terminal from the one that is directly to the center rear. The rotor turns counterclockwise so what you do is follow the firing order going in that direction. The firing order for your engine is 1-5-4-2-6-3-7-8. You want to make sure that you keep the wires for the two consecutive firing cylinders that are on the same bank separated or else you risk a blown head gasket or worse if any spark is picked up by the next wire. The two wires to keep separated for your engine is #7 and #8.
Your engine must be at TDC on the compression stroke and the rotor must be pointing to the #1 terminal on the dist cap. You can actually start the #1 terminal to the position of the rotor as it is in the engine right now or else you will need to pull and reposition the distributor.
You will need to position the dist. housing so that you can adjust the timing advance. The timing is advanced by turning the dist. in a clockwise direction. This is particularly true if you have a vacuum advance canister on the dist. Give yourself room to turn the dist. in the clockwise direction. Your reference will be when the rotor is pointing directly at the #1 terminal, engine at TDC.
If you haven't already figured, you will need to mark the dist. housing to where the determined #1 terminal is located on the dist. cap because the cap has to come off to see the rotor.
There is no gasket located under the dist. at the engine. You may find some thin metal shims where the dist. gear mesh was adjusted at the factory. Most of the time aftermarket distributors have the gear positioned pretty accurately on the dist. shaft, though.
The distributor is supposed to sit flush on the deck. No gap. Something is going to break if you tighten down on the hold down bracket. If you have a performance, aftermarket oil pump drive shaft, it may not be machined down far enough and this is causing interference. The later model stock distributor shafts were made 1/2" longer than the earlier design. Your HEI distributor may be modeled after the late model, stock distributor and the oil pump shaft is for the early, shorter distributor.
You will need to either change the pump shaft to one that is for a late model 5.0 or cut off 1/2" from the bottom of the dist. shaft. There may be a reference to this in the paperwork that came with the HEI.
If you are using the stock oil pump drive shaft, this won't be the problem. They are machined with the "Hex" for the full length. They are weak and should be replaced with the correct performance, aftermarket shaft, when possible.
There are two other possibilities. One is that the dist. gear is in the wrong position and will need repositioning. It is bottoming out inside the engine. There should be .040" clearance before it bottoms out. The second, and this may be the problem, hopefully, is the O-ring on the housing doesn't want to seat into position. Did you lubricate the O-ring before installing the distributor? Sometimes it takes a gentle tap against the housing do get it to seat.
Good luck and welcome to the forum.