But after the resurrection bodies can walk through walls, so they are not just as our flesh and bones are now. As for gender, there needs to be a distinction between male and female as the Church has said, but I don’t think genitals are in heaven
At least St. Thomas Aquinas held that the sensitive organs of the sexes will be present and citing D207 condemnation of Origin’s teaching, from Pope Vigilius (537) 540-555: Can. 5. If anyone says or maintains that in resurrection the bodies of men are raised up from sleep spherical, and does not agree that we are raised up from sleep upright, let him be anathema.
The act of intellection requires sensation, and the acts of sensation require bodily organs.
You are thinking of the second dogma, Fundamentals of Catholic Dogma, Ludwig Ott, p. 491 has:
a) The bodies of the just will be remodelled and transfigured to the pattern of the risen Christ. (Sent. certa.)
…
β) Subtility (subtilitas), that is, a spiritualized nature, which, however, is not to be conceived as a transformation of the body into a spiritual essence or as a refinement of the matter into an ethereal body (cf. Luke 24,39). The archetype of the spiritualized body is the risen body of Christ, which emerged from the sealed tomb and penetrated closed doors (John 20, 19. 26). The intrinsic reason of the spiritualization of the body lies in the complete dominion of the body by the transfigured soul in so far as it is the essential form of the body. Suppl. 83, I.
γ) Agility (agilitas), that is, the capability of the body to obey the soul with the greatest ease and speed of movement. It forms a contrast to the heaviness of the earthly body, which is conditioned by the Law of Gravity. This agility was manifested by the risen Body of Christ, which was suddenly present in the midst of His Apostles, and which disappeared just as quickly John 20, 19. 26 ; Luke 24, 31). The intrinsic reason of agility lies in the perfect dominion over the body of the transfigured soul, to the extent that it moves the body. Suppl. 84, I.