i successfully changed my engine from 1.6 to 2.0 in a MK4 Golf 2001 the engine 2.0 start fine and run soft, but i am using the engine ecu from the 1.6. my question is if i can change the ecu from 1.6 to 2.0 using the wiring harness of the 1.6 engine?
Welcome to MVM&R! As you've already found out, the wiring in the car allows you to start the 2.0 engine with the 1.6 ECU. The main reason for this is that the wiring loom is effectively the same across most of the Mk4 Golf range. You will find that pretty much everything between the 1.6 and 2.0 will be plug-and-play with one possible gotcha. In 2001, the Mk4 Golf was face-lifted. Externally you'll see little change between the old and new version but mechanically and electronically, the two vehicles have some key differences.
Ideally you want to switch to a 2.0 ECU, or at very least have the 1.6 ECU remapped to suit the fuel and ignition demands of the new engine. You will however find that if you simply plug an ECU from a 2.0 into the car, it will not start. The inbuilt immobilisation in the Mk4 ECU ties the ECU, clocks (i.e. instrument cluster) and ignition key together. If you have all three from a 2.0 and it is the appropriate vintage (i.e. from a pre or post 2001 car depending on what you have) it will go in and work.
Alternatively you can either have the immobilisation defeated by sending the new ECU to a specialist or you can have a specialist program your new ECU to your existing instrument cluster and code in a brand new key transponder chip. If you do go this route, you'll encounter the terms IMMO2 and IMMO3, this simply relates to the immobilisation system present on the car.
So, in answer to your ECU question, you either want a native 2.0 ECU or have your 1.6 ECU remapped for the new engine. You should not use the unmodified 1.6 ECU with the 2.0 engine. As for loom, Volkswagen have been very good at standardising wiring looms since they introduced their CE1 standard back in 1985. Yes, the 2.0 ought to plug straight into the 1.6 loom but just ensure that any parts vehicle you use is from either pre-2001 or post-2001 depending on the age of your Golf. If you mix and match pre and post, they will generally still work but you may find yourself chasing odd issues.