Some framework for the question.
Surrendering to the western allies is a good outcome if possible, but only if an opportunity arises.
i dont have any special skills, but im willing to learn or lie if doing so means being assigned to something/somewhere less dangerous.
order of priority
survive
Not serve on the eastern front
Well most likely if you are about to turn 18, you will be receiving some sort of conscription notice in to the Wehrmacht (the German Military), and more specifically the Heer (the German Army) shortly before your birthday. This notice will give you recruitment / draft location to report to, usually within a few weeks to a month of your 18th birthday. After you go through your initial physical and mental testing, and various other aptitude tests, you will then be given a notice of enlistment in to that branch of the military. Usually you would be called up to basic training within another short period of time. You report to basic training, and join a locally raised unit, or are sent to another unit already serving at the front as a replacement. There is no getting out of it, except for “Diving” (Going underground or going on the run. what draft dodgers, and others on the run from the Nazis did. The term is derived from U-Boats diving under water). Now, you are 17 years old and it is waning days of 1942, most likely you have already been active in the war effort. Most likely you are part of the Hitler Youth, and maybe have done your one year assignment doing work for your country (that all German youths are required to do); probably working to dig defenses ditches, or plowing farmers’ fields etc… This was required work for almost all German teen youths. You have also been heavily indoctrinated in to Nazism for almost 10 years now, so since you were seven. You probably believe in your government, your people, and that your nation is at war for a just and right reason. You may not want to go to war, but many of your peers do. So you do not want to look like a coward in the face of your Hitler Youth comrades. Then again you could have an older brother, or father, or friends already at the front (or came home wounded, or died at the front), which in that case you may have a very cynical view of the war. Or maybe you live in a metropolitan area that has been bombed relentlessly by the RAF and USAAF, and are skeptical about the war because of that.
So now if say one or both of those latter examples has jaded you to the cause, and you want to get out of it, or at least not fight the Soviets. What can you do? Easy, get a voucher saying that the work you provide for Germany is invaluable, and thus you are exempt from the draft. Now in order to get these vouchers you need to work in an armaments industry, or a coal mine, or be an Engineer working on some sort of national project under Organization Todt (like working on the Autobahn, or building concrete bunkers somewhere). So you better get one of those jobs. But if say they are not hiring, are full up, or you just do not have the technical skill, then your only other option is to voluntarily enlist in either the Luftwaffe (Air Force) or the Kriegsmarine (Navy). Once in either of those branches, express interest in learning a Military trade / career as a mechanic or some other non- Frontline type military career field. Now this is not a guarantee to get you away from the Soviets, or from war, but it does increase your chances.
HOWEVER, by late 1942, early 1943 the Army was needing more and more replacements for the meat grinder that was the Russian Front. The German Sixth Army was encircled and being annihilated at Stalingrad – eventually surrendering in February 1943. An entire Army went in to captivity and was removed from the military index. The German Army needed replacements, and they needed them as soon as possible. So your timing of birth was utterly horrible. Looks like you are most likely going to get drafted in to the Army. Even the Airforce was raising infantry, paratrooper, and armored units to fight like army field units on the ground. So the Navy and Airforce might not even accept your voluntary enlistment – especially if the Army (and the Army came first) needed troops! Now of course once in the Army, which is the most likely scenario, you have 0 control over where your unit is sent. You do have a minor amount of control over your career field – especially if you show excellence and aptitude in something considered vital, but not combative, or combative but slightly behind the lines like heavy artillery (like if you are excellent at physics and math, this could really help you in an artillery field path). However, if not, you are most likely being sent to an infantry company.
But for realism argument sake, let’s just say you are average Hans Deutsch. Nothing special about you, you are just the ordinary German almost 18 year old. You are physically and mentally normal. You are drafted in to the Army, and you are sent to a locally raised infantry unit – that is about to go to front. You have zero control of your destiny. Now after all of that training, and being transferred to units etc… this puts you at summer 1943. The only theater where Germany is actively fighting the Western Allies is in Sicily and soon after southern Italy. Unless you are stationed on some Greek Island, to guard against British commando raids. So let’s assume for arguments sake you luck out and your division has been called up to fight in Italy. Phew you lucked out from fighting on the Russian steppe, or in the tundra!
Germany did well at first fighting in Italy. This was not a cakewalk or “the soft underbelly of Europe” that the Allies thought it would be. You are actively engaged in combat, most likely fighting the British or Commonwealth soldiers, but maybe the USA too. You love the local atmosphere, but hate being at war. However, your unit is well dug in along a ridgeline in the Apennine Mountains. This war has now basically turned in to mountain warfare similar to World War I. Trenches, small artillery, mortars, snipers, Machine Guns, minefields and barbed-wire galore! Rain, muck and mud. You hate it. You have to get your rations from some donkey or mule that brings them up the mountain from your field kitchen. Depending on how pitched the battle is, will depend on how often you get hot food! You will most likely not see a warm meal but for a few times a week.
You cannot take it and you want to go over the top, and run to the allied lines and surrender. However, you also do not want to betray and abandon your comrades – whom you have formed a close bond with over the past few months of fighting in this hellish condition, and whom you went through basic training with. They are now like brothers to you. Hell they are more than brothers to you! But man you really want to get out of the war. You are not fighting the Soviets, but the British! This is a great opportunity. But man the constant lobbing of mortars and small artillery, and MG fire back and forth at each other across ridgelines makes this task virtually impossible. It also really hinders things that your regiment’s pioneer (engineer) company has planted an assortment of landmines in the valley and gully between the lines, in No-Mans-Land! And you do not have a map of the minefield. You are stuck. Both stuck out of duty for your country, but most of all for your comrades. And also stuck by the physical barriers and circumstances.
In the middle of the night you hear “Boom! Boom! Thud!” and then a cacophony of sound. The British have somehow made their way up your side of the mountain, through the minefield, and are now raiding your lines. Your comrades in the next trench over are fighting hand to hand and with pistols, submachine guns etc… You think “No! They are getting slaughtered!” your mind rushes to saving your comrades, instead of using this as an opportunity to surrender. You pick up your Kar98 rifle, alert the Machine Gun crew that you are a part of, and redirect the fire towards the advancing British and on to the neighboring trench. Mowing down the British raiding patrol. You have helped saved the day, and are rewarded with your actions of bravery and are given an Iron Cross, and because of some deaths you are now promoted to Corporal (or Sergeant in equal to American Military terms) and are now a squad leader! Shit! No way out now!
I can continue the story… if you want! I mean a lot of is fictitious, but it is all based off of reality. You could surrender later on in the Italian campaign when it is clear Germany is losing – assuming you have not been killed, wounded, or transferred to another front.
Edit: Edited some grammatical and spelling mistakes.
Related question- what if you just refused to work? I mean, didn't follow any order given, didn't show up where you were supposed to, etc. I'm guessing you might get beaten up, and probably thrown in jail, but wouldn't that be preferable to the Eastern Front?