It would really depends on the results of the compression and leak down tests.
Those 2 tests will tell you the condition of the MOTOR INTERNALS ( condition of the heads, valves, rings, and cylinders ).
Why would you consider putting head gaskets on a motor if you do not know the condition of the rings or the cylinders!
Honestly do those 2 tests and then it is easier to advise you if you need to do a swap or just change the gaskets.
Both jobs are alot of work, but you would not want to go thru the work of changing the head gaskets if the rest of the motor needs a rebuild would you?