Keycloak is generic identity provider - it does offer OpenID Connect compatible endpoints to authenticate external applications. You can pair Keycloak with Discourse using discourse-openid-connect plugin.
The Discourse Connect is a bit different. As far I understand it does permit to completely delegate user management to Keycloak, which might not be what you need for a start.
Note, I’ve made a integration to let Keycloak work with Discourse as identity provider. From what I see it shall be possible to implement Discourse Connect compatible endpoint for Keycloak, however that’s another story.