Anything any Russian official says is distorted heavily to suit western narratives. Peskov mentioned that Russia had suffered "heavy losses" and that was interpreted to suggest Russia was somehow losing. Westerners hear what they want to hear.Peskov said it was going to end in the near future, "perhaps in a few days", by either negotiations or because the Russians "achieved their objectives", e.g., a unilateral retreat. This in no way contradicts what Peskov says, it just means a unilateral Russian retreat is in the near future.
Also, Peskov is currently on the receiving end of a lot of hate because of his perceived soft stance. Russian public opinion has shifted massively against the west.
Putin has said that the war will continue until all objectives have been met. To me that means the conquest of all of Ukraine.