How to change extension of asset?

I’m trying to do something like this:

Texture2D obj = AssetDatabase.LoadAssetAtPath<Texture2D>("Assets\\Textures\\texture.png");
AssetDatabase.CreateAsset(obj, "Assets\\Output\\Textures\\texture.texture2D");

But this throws an exception saying that the asset already exists. Specifically:

Couldn’t add object to asset file because the Texture2D ‘texture’ is already an asset at ‘Assets/Textures/texture.png’!

Thanks.