Why I always end up composing same type of melody? Do every beginner composer face this problem?
What do you listen to? How varied is your playlist? I find that I often ape the last thing I listened to, so you may need to listen to something new/different for a while.
And to echo Laurence's answer, I find that I write differently based on whether I'm playing guitar or piano (and even if I'm playing acoustic vs. electric guitar).
Yes, everyone gets stuck in a rut. I worked on a new show once, and concocted a finale routine which combined several of the songs. The composer thought I was being ever so clever, until I pointed out that he'd essentially written the same song several times!
If you normally compose to guitar chords, try using keyboard instead. If you normally start off with a chord sequence, write a melody instead. Then write a bass line. Don't worry about what the chords might be.
If you normally write ballads, write a fast song. If you normally write about love, try writing about anger. Etc. etc.
Because it's unlikely you're going to reinvent a musical style. Instead you'll need to add new styles into to your songwriting palette.
For example if you write pop-rock then try writing a folk, reggae or bluegrass song ... or perhaps an unfamiliar time signature.
You need more musical winning formulas.