As mentioned in the comment above, I did work like this professionally for a long time. I'll start by saying that I've tried putting IMUs on cranes in the past, and you're really just better off pulling position information from the crane control system, which should be getting position information directly from the position encoders on the crane. This is the best, most reliable data you can get.
Any IMU will have biases and noise, and you will accumulate those errors over time.
Regarding your questions specifically:
Will the gyroscope have errors or uncertainty in its reading as it is placed away from COG? If yes, how do I compensate that.
Rotation of a rigid body is the same at all positions on the rigid body, so gyroscope readings are unaffected by placement, unless accelerations affect the readings. If this is the case then it should be noted in the datasheet.
I referred the bellow article stating effect on accelerometer if IMU is placed away from COG. From this article I came to the conclusion that I have to compensate the accelerometer readings if Accelerometer is not placed at centre of gravity of the body, is my conclusion correct? Can someone help me understanding.
Yes you will need to compensate, and I don't think I can explain any better than the article you linked explains it. An object that is rotating some distance $r$ from the center of rotation is also translating through space. But, since it's rotating, it's not translating in a straight line.
If it's not moving in a straight line then it must be accelerating, because acceleration is the only way to change the direction of the speed vector.
If the turret is facing backwards and crane is moving forward will this change my calculations.
The is a classic point that is drilled into engineering students - you need to create a free-body diagram that captures all of the relevant motions and forces when you create your equations of motion. As long as your equations are all based in the same frame then you shouldn't need to change anything based on orientation because they'll work themselves out with sign changes.
Rail-mounted gantry cranes can conceivably gantry and trolley, translating x- and y-directions, in addition to your slew/yaw motion. Rubber-tire gantry cranes, or any other cranes that aren't fixed to a rail (tracked cranes, etc.) could rotate the gantry frame in addition to rotating the cab/jib, and so you could possibly have two kinds of rotation in addition to two kinds of translation.
But really, I can't stress enough that an IMU will always have position drift, and there is nothing you will ever be able to do that will eliminate that position drift. The Madgwick filter uses gravity/down to fix roll and pitch rotations, but those shouldn't be an issue on a crane. You'd be more concerned with yaw/slew motion, which should be fixed by magnetic North, but any environment where a crane is operating will have a lot of magnetic interference that will prevent you from getting reliable compass readings.
If you "just" pull encoder readings off the crane then you could know the 3D position and orientation (pose) of the cab by forward kinematics. I put "just" in quotes because I know even this can be challenging, but I sincerely believe accessing that data is going to be easier and more effective long-term than trying to build a positioning system built around an IMU.