“Gender” vs “gender identity”

What is the conceptual distinction between “gender” and “gender identity?”

If there is no distinction, then is the idea that I am supposed to identify with my identity, and that’s what determines my sex? That sounds pretty circular. Not to mention unfalsifiable. Doesn’t an identity need an object external to itself that the identifier identifies with?

If there is a distinction, then where precisely does the distinction lie? What is my “gender” that I am supposed to identify with? Is it just the feeling that I am male or female, entirely divorced from the biological reality of whether I am in fact a male or a female? If so, then why am I only permitted to identify with my feelings about whether I am male or female, and why is this totally subjective, anti-realist identification the thing that determines whether I am male or female? Again, where where is the external object of the identification? If my incorrigible, unfalsifiable image of myself is the sole permitted object of my identity, is that really different from conflating “gender” with “gender identity,” which we have already seen is totally circular?

Either way, there certainly appears to be irreducible question-begging going on with these concepts.