Hi JWL,
It is possible that a gain is due as you did not live in the house as your main residence for the whole period of ownership.
You chose to move away for work and then did not return to the property prior to selling.
The cost of the new house is irrelevant as it is the differnce in price on the property that has been sold determines whether a gain has arose or not. Please refer to guidance here:
Capital Gains Tax: what you pay it on, rates and allowances.
Thank you.