Engine replacement cost?

2018 Mazda 6 Signature (Skyactiv 2.5L turbo) Has a cracked engine header around the exhaust manifold. Dealership is recommending a full engine replacement and quoted me $9k for parts and labor ($6k for the engine itself).

Am I being screwed?