I am thinking of changing my primary domain name but redirect the existing domain name to a new primary name. Would there be a Google or search engine penalty for doing this?
There is no penalty for changing domain names. There may be a temporary disruption in your indexing and ranking. Then there is risk that SEO gets completely messed up during the process.
Google has a change of address tool built into search console. You need to use this tool when you change domain names. Doing so involves implementing "301 Permanant" redirects from the old URLs to the new URLs and then using the tool to inform Google that the domain name has changed. When you use the change of address tool, search engine rankings and traffic may temporarily drop for a week or two, but then it should come back to original levels.
However, for a small percentage of sites, something goes wrong, even when using the tool. There is a about a 10% chance that things go sideways and your SEO suffers dramatically. 90% of sites have no lasting issues, but a small number of sites have severe problems (for example). Because of this risk, you should only move domains when the other benefits outweigh that risk.
If you map your entire site out and 301 redirect all pages to the new locations, it's likely to be mild at most. However if you just 301 the entire old domain to the new homepage it's likely to be bad.