1. Don't thread CPVC into brass. It will leak.
2. Don't attach CPVC directly to hot water heaters since CPVC is not rated for continuous hot water.
I would suggest running brass, copper, or steel out and/or over at least 6 inches and then use a brass to CPVC coupler that uses a rubber gasket.