In his 1996 book "Why the Allies Won", Richard Overy writes that "On the face of things, no rational man in early 1942 would have guessed at the eventual outcome of the war." At that point Germany had conquered Poland and France in a matter of weeks; they were making great progress in Russia; Japan had bombed Pearl Harbour, occupied half of China and taken all the Allied possessions in Southeast Asia. In the words of Mr Overy, the eventual Allied victory represented a "remarkable reversal of fortune."
On the other extreme, it seems clear that by late 1944 and 1945 the Allies were making very clear plans for how to progress after the defeat of Germany. This is best evidenced by the conferences held in Moscow in October 1944 (the "Tolstoy Conference") between Stalin and Churchill and the Yalta Conference in February 1945. While previous conferences (eg Tehran) had been focused on prosecution of the war, these two were almost entirely focused on the division and order of Europe after the defeat of Germany.
This sort of planning was not simply posturing or wishful thinking. There was detailed work underway (as evidenced by the months spent at Dumbarton Oaks in summer/autumn 1944 developing the framework of what would become the United Nations) and it seems very unlikely that the Allies would have devoted these sort of resources to detailed planning unless they considered victory over Germany "a matter of time" by late 1944. The Germans and the Japanese were certainly not having these sorts of planning sessions at this stage.
While the defeat of Germany was clearly more than a formality in 1944/45, it would have taken an almost unimaginable set of circumstances for Germany to fully reverse the tide and "win" the war against the Allies at this stage.
However your question wasn't whether there was a sense that "Germany be defeated" but rather whether there was a sense that "we are going to win". This is a much more difficult question to answer, and it is much less clear cut.
First, there were a range of possible peace outcomes throughout the war other than the "unconditional surrender" that eventually occurred. That is not the way that most wars had ended and many might have expected some sort of compromise with Germany which didn't involve its complete occupation. The Allies had agreed from 1943 to not accept anything other than unconditional surrender but we will never know how this would have played out in counterfactual scenarios: if the 20 July 1944 plot to kill Hitler and seek peace terms with the Allies had succeeded, it is difficult to argue that the Allies would have definitely rejected this.
Second, as has been evident in recent decades, a decisive defeat of a nation's military does not a victory make. There were genuine concerns amongst the Allies as they entered Germany that even after the defeat of the Germany military, there would be an insurgency led by committed Nazis. This was not a baseless fear: Himmler began developing "Werwolf" commando brigades for precisely this purpose as early as summer 1944. While in retrospect the rehabilitation of Germany and its integration into Europe seems inevitable, this was not a foregone conclusion at the time.
Third, there is the relative positioning of the Allies to consider. The Allies were an alliance rather than a homogeneous entity and, as evidenced by the points above showing the amount of time and energy that went into deciding the post-war order, there was huge insecurity amongst the allies as to whether and how any of them were going to "win".
For instance, from Churchill's perspective even if he considered the defeat of Germany inevitable (which, I would argue, he had good reason to from as early as 1943) the questions as to whether Britain was going to "win" would have focused less on Germany and more on Britain's relative position in Europe, the future of its overseas possessions and its relative position in the world.