How long have you been with him? Did he just straight away reject after you confessed to him?
Could be he just want to stick being friend with you or just not ready for it yet.
At least it is better than not confess to him and keep on wondering what he got on his mind about you.
Guy rejected my confession, but still text me