Competing baby at night

I need help , my son eats at night to comfort himself back to sleep. He eats 4oz of milk , was told not good but he doesn’t want to go back to sleep any other way. How can I slowly stop this??

Any parents co sleep past than 6 months?