Nursing too much at night

My 2 month old wants to nurse for HOURS every night. What can I do to stop this? He’s only happy at night when he’s nursing but he wants to do it for HOURS. It hurts so bad. I tried adding a pacifier and he had no interest. Any advise please! I need sleep!!