I guess a watch out for swapping heads between engine types is maybe the coolant channels? I'm not sure if it's a difference in the actual head cooling channels, or just the head gasket cooling channels.From everything I've read they are the same engine, except for............the water pumps, the N55s' is electric and the S55 is mechanical so it's bolted to the block and the N55 uses a water pipe to get the water to the block. The heads can be interchanged, but the turbocharges cannot be without an adapter. The oiling system is different but the better S55 parts fit the N55, this was OEM with the M235R . I'll be using the S55 pumps, suction pipe and oil pan on my N55. All the sensors are the same and the N55 vacuum pump will work on the S55 block as well. The N55 DME should be returned if the dual HPFP's and twin turbos from the S55 are NOT utilized. The only peeve I have with the S55 is the "upgraded" aluminum sprayed cylinders, they cannot be over-bored like the steel ones used in the n55.
On both n55 and s55, hot coolant leaves the head on the intake side at cylinder #1. On n55, cool coolant enters the block on the exhaust side between cylinders #3 and #4 (Or 4 & 5 for n54). If you look at the gasket cooling channels for n55, you'll see that they are sized to normalize flow at each cylinder, based on where the coolant enters the block and leaves the head (longer flow path cylinders have bigger flow ports). But on s55, cool coolant enters the block on the exhaust side at cylinder #1 I believe. This provides significantly different coolant flow paths for each cylinder compared to n54/n55.
I haven't compared n55 and s55 head gaskets, but if you do compare them I'd wager that the coolant channels in the gaskets are set up differently so that flow is equalized for each cylinder based on that engine's flow dynamics inside the block/head. So probably best to use the head gasket that goes with whatever block you're using (n55 gasket for n55 block, s55 gasket for s55 block).
Mind you, this is just speculation on my part though.