No problem in doing the job. Puppies need to be trained to stay in the crate as this seems new to them at the beginning. The thing you need is just the training him in the best way.
Crating is based on the idea that dogs are denning animals. In the wild many canid species use a small cave or dug-out area to give birth to pups and for protection while sleeping or resting. Using a crate as a housetraining aid has two purposes. First, it makes it easier to supervise the puppy and prevents him from having complete access to the house where he is likely to get into mischief. Second, since puppies have a natural tendency not to soil their den or sleeping area.
You can make your puppy sleep in crate by training him gradually. Start by Introducing your puppy to the crate, then feeding your puppy in the crate, Conditioning your puppy to the crate for longer periods, Crating when left alone , Crating at night. This will result fir the desired thing one day.