I was you two years ago. For us it last 2 months and only really resolved after sleep training and night weaning. Once he could self settle without milk he started sleeping through again.
If he can do it for naps that's a good start. It was the same for us - he could go down for naps but not at night.
When he wakes make feeding the last thing you try. So upon waking, go in and turn on the white noise, and put your hand on his back to pat him slowly and rhythmically. You may want to use gentle shushes - do not speak or communicate. You don't want to be stimulating or amusing. Give this a good 5 minutes before giving up.
If he doesn't drop off with patting, pick him up. Slowly rock him up and down - if you have a white noise machine with a heartbeat use the beat to set your pace. I held him horizontally instead of upright, so I could just set down a sleeping baby without having to reposition and risk disturbing. Again, give this a good 5 minutes.
If you still have no joy, feed to sleep. Try again next time.
After about a week of this, my son could sleep through most nights again. Keep an eye on his weight to make sure he is genuinely ready to drop night feeds - most are at this age.
At 1 am this is the last thing you'll feel like doing, but for me after 2 months of averaging 4 hours broken sleep every night I promise this is the path of least effort.
All the best 💐