is often considered an emphasized version of わけではない in stating that something ‘doesn’t mean that (A)’, ‘(A) is not always the case’, or ‘it’s not that (A)’. Being that という often presents (A) as a matter for discussion, or an important quotation structure, it will regularly be used to refer back to something that another person has said, in order to clarify that it may not be 100% accurate.
may be used after any structure that could usually be paired with という, and a more literal translation may be thought of as ‘it is not so that (A) can be said’. Although not required, だ will often be seen before nouns and な-Adjectives, and というわけではない.
Just because I lived in Japan for two years does not mean I speak Japanese.
It's not that I don't like math, I'm just not good at it.
Just because they are always smiling doesn't mean they are nice.
It was not a divorce, but we had to live separately for a while.
will regularly be used when the speaker is denying that something said earlier is the reason for something. This could either be a misunderstanding that they themselves want to avoid, or something that the listener asked them to clarify.